When comparing Silex vs Fat-Free Framework, the Slant community recommends Fat-Free Framework for most people. In the question“What are the best PHP frameworks?” Fat-Free Framework is ranked 4th while Silex is ranked 14th.
Ranked in these QuestionsQuestion Ranking
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.
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.
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 Simple development set up
Pro Lightweight without losing functionality
The framework is very lightweight and fast. Even though it's pretty light, it still does not lose a lot of functionality.
Pro Shortened development time
Building an application that processes a URL (display a page, submit a form, invoke Ajax, etc.) requires very little code and can be achieved very quickly. Allows developers to focus on the application itself and not the plumbing.
Pro Easy to get started
After you download the framework it is very simple to get an app up and running very quickly. Makes it easy for newer PHP and web app developers to start using a MVC framework.
Pro Very stable
You know those frameworks that have updated 5 times during your own development phase? Well, F3 sees one or two updates per year. Never had any issues updating or upgrading. F3 just works.
Pro ORM supports sql, nosql, and jig
Pro Highly modular
Virtually everything is modular. You can choose which modules and libraries to include and to keep the framework as lightweight as possible.
Pro FREE structure
Pro No canned coding/directory structure
Freedom to structure your projects' directories and codes as you wish.
F3 is a non-opinionated framework : you are entirely free to use the files/API/assets structure that you love.
Following a minimalistic approach, F3 tends to avoid adding code and structure that are not strictly necessary, while focusing on what really matters : coding your solution; actually you learn F3 while implementing/coding your project/webapp
Pro Multiple view engines
Default view engine is superb and can also work with varieties of PHP view engines including Twig.
Pro Vibrant community behind the framework
The community is responsive and helpful in clarifying the aspects of the framework.
Pro Very little spin up time
The time to go from knowing nothing about Fat-Free to getting a project completed is very reduced compared to other bulky frameworks.
Pro Comprehensive documentation and API reference
Concise and to the point documentation. Includes many examples and complete API reference.
Pro Unit testing toolkit
Pro No composer, curl or dependency injectors
You download a zip file and use it by placing require(); statement. No need to use composer, curl or any dependency injector which sometime become a great pain.
Pro Very little not included by default
In a framework that's so small, it puts the rest to shame.
Pro Self documenting code
Pro Good documentation
With many examples which are easy to follow by new users.
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 Community is a bit small, so if you get stuck you have trouble finding answers via google
Searching for "fat-free minification" on google sometimes doesn't give you the "right" answer.
Con Backward incompatible within minor version
There are serious incompatibilities even between minor versions (eg. between 3.6.0 and 3.6.2). Developers exhibit complete lack of understanding what is versioning of product (and which changes should be integrated in which versions), which makes this framework unsuitable for serious work. Development is slow, stable versions are rare and not treated seriously.
Con Default ORM doesn't support joins
The default ORM for this framework is missing some features such as joins. But it's important to keep in mind that it's a small plugin, only 23KB in size which still can be replaced with a larger ORM if needed.
An alternative the drop in f3-cortex ORM which is popular, and supported by the community, which supports Joins and much more.
Con Need more example of working code and directory structures and usage with JS and CSS frameworks
The project has been abandoned since 2016. (not abandoned since 2019 with multiple new releases)
Con The default template engine is "home made"
Con Lack of video tutorials
While there is a great user guide, compared to other established PHP frameworks, there is a relative shortage of video and written step-by-step tutorials for newbies to learn this framework.