When comparing Silex vs Zend Framework, the Slant community recommends Silex for most people. In the question“What are the best PHP frameworks?” Silex is ranked 14th while Zend Framework is ranked 18th. The most important reason people chose Silex is:
The thing that makes Silex stand out from other PHP microframeworks is the fact that it's built using some of Symfony2's components. Making it quite powerful but still lightweight enough to be considered a true microframework.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Built on top of Symfony components
The thing that makes Silex stand out from other PHP microframeworks is the fact that it's built using some of Symfony2's components. Making it quite powerful but still lightweight enough to be considered a true microframework.
Pro Open source
Silex is open source and is licensed under the MIT license.
Pro Simple and elegant DI container
Based on Pimple, Silex has a simple Dependency Injection container that consists of just one file and one class.
Pro Testable
Silex makes use of Symfony2's HttpKernel which is used to abstract requests and responses. This in turn, makes it very easy to test apps created with the framework.
Pro Extensible
By using Pimple, the Silex application extends the Pimple class, which in turn is nothing more than an implementation of the ArrayAccess interface that has been a part of PHP since version 5.0.
This makes it possible to use an instance of the Application class as if it were an array. Like so:
$app = new Silex\Application();
$app['config'] = new Config($config_path);
This gives developers a great deal of flexibility when injecting dependencies and when testing.
Pro Well architected
Pro Enterprise ready
Zend is the most used PHP framework by big businesses. Zend is widely used and tested by a large number of banks, as well as companies, such as Allied Beverage, BBC, Shaklee, CarinBridge, BNP Paribas and more.
Pro Corporate backing
Partnered with Google, IBM, Adobe, Microsoft
Pro Extended predefined classes
Zend has a large library of predefined classes with which developers can create maintainable and stable web applications. This is done if the developer works within the constraints and with the components of these different predefined classes, which makes the application more maintainable.
Pro Wide database support
Zend supports almost all kinds of databases out there. From MySQL, IBM DB2, Oracle, Microsoft SQL Server to PostgreSQL.
Pro Allows customization
For developpers not used to Zend, they can use a predefined structure and use preloaded components and classes to build and maintain their application. But for advanced developpers, they can customize the structure to stick to their needs (or their likings) and extend primary Zend components for fine-tuned apps or replace the initial predefined Zend components by third parties components such as Doctrine ORM or another logging or templating framework.
Pro Easy to build an API with Apigility
Apigility is a collection of Zend Framework modules. It's useful for building the API architecture of a web app quickly and painlessly by providing a flexible engine.
Apigility also has a web-based UI that allows developers to quickly create and modify API services, configure authentication, set authorization rules, set up validation and write new documents.
Cons
Con Documentation is not very extensive
The documentation for this framework is average, it's helpful mostly. But it is not extensive enough to cover everything in detail unfortunately.
Con Loose documentation
Since Zend has a loosely-coupled architecture, it means that the documentation will be quite loose as well. Even though there's a lot of documentation for the framework, it's still hard to use it as a guideline to create a completed project. Although this can be less of a problem considering all the tutorials and guides out there.