Guide to 24 PHP Frameworks [Part 4]
Coding (Php 7.x)Sep 16, 2018
This is the final episode of the series about PHP frameworks, Here you will see Smart, Symfony, TwistPHP, TYPO3 Flow, Yii and Zend
Follow the series ...
This blog post is the fourth and last part of "The Definitive Guide to your next PHP framework"
If you did not read it yet
Introduction to the fourth and last part
We are finally here.
Right now, you can consider yourself as a proper master Jedi of PHP frameworks.
If you have followed the previous parts you have discovered that there are several different types of PHP applications that can speed up the development process of your web projects or websites.
Below you will find the last few elements that I consider to be the best among the 24 frameworks available today.
My advice, again, is to read through all the reviews in these posts and knowing what do you need to create choose the perfect fit for your project.
Table of content
- Introduction to PHP Frameworks
- Fat Free
- Nette Framework
- Pop PHP
- Smart Framework
- TYPO3 Flow
There isn’t a lot of information on the internet about this framework.
The project started between 2009 and 2011 by UNIX-world, a software company with more than 15 years working on the web.
Its initial release is dated February 2012, and it seems often updated,
At the moment, the latest stable version is the 3.7.5 released on the 25th April 2018.
As some of the previous items you saw before, it is a free open-source product, BSD licensed and it follows the MVC architecture by mixing multi-tier and middleware.
Why would you want to prefer it rather than others?
Well, on the official website, the owners claims that this framework is many times faster than other much more popular ones such us Zend and Laravel.
This could be a good reason to try it.
Even though, as a downside in order to begin, you need to have a look at the documentation that in this case can look a bit cluttered.
This is another member of the top-framework club.
Symfony started in 2005 by Fabien Potencies, CEO at SensioLabs and Blackfire.io.
At its first version, Symfony was supporting PHP 5.0 and just a couple of features, since then it has increased in popularity and reliability becoming now one of the 3 most popular just after Laravel and CodeIgniter and the first by usage from enterprise companies.
Symfony is composed by sets of several PHP components that merged together to form the framework.
Since its initial release, it was published on a regular base, at least 2 new versions per year.
all of the different releases have at least eight months of support and in some cases, it goes up to three years,
There are 4 different versions currently on an LTS release; 2.7 and 2.8 which were both released in 2015, while versions 3.4 and 4.0 was released in November 2017.
At the time of writing this article, the next version will be the 4.1 and it will be released in May 2018 and it will support PHP 7.1.3 and newer.
As I said early, this framework includes plenty of components, more than 30, and explaining all of them is out of the scope of this article.
But some are really interesting and worthy to be mentioned here.
Among them, we find the cache component which provides an extended PSR-6 and PSR-16 for adding cache to the applications, the console component which is self-explanatory,
A PHPUnit bridge that reports legacy test and deprecated code, as well as security, translation, routing and validator components.
One of the amazing characteristics of this framework is its documentation.
The guys who are developing this project not only have created a very detailed one but there is an explanation for each of the components.
There are also tons of people talking about this framework and a huge community, so documentation and support will never be a problem and this is something to be considered from someone who wants to start using it.
Should I learn Symfony?
To answer this question, I will describe a famous rule on investing.
This rule says that it is a very good idea to focus on blue-chip company, with a very famous brand and decades of successfully divided payment.
Here, we have a blue-chip PHP framework of which other different frameworks were born from.
For example, Laravel, even though has a more contemporary style, started and is still massively based on Symfony components.
This is a proof that if you like its traditional style, Symfony is undoubtedly the framework to start.
This is a little framework that makes of the ease of use its trademark.
It is an open-source framework given away under GNU license.
It contains several features that can be implemented by almost only a couple of lines of code.
TwistPHP born as a private project, and as improvements took place, its source-code became public and moved to a GitHub repository in July 2014.
The first official release occurred with TwistPHP 2.3.4 in November 2014.
Throughout these years, this software had plenty of time to improve and now with its last stable release (3.0.5), it has a complete MVC architecture, Object Oriented design, and brand new method to connect to the database and create MySql queries, the way it has built facilitate its extendibility and reliability.
it can be considered a modern framework in all and for all.
If you want to give it a try or help the project grow you can support it through its GitHub repository below
To effectively describe this framework, the story needs to start with TYPO3.
It is a free and open-source CMS developed more than 20 years ago (initial release dated 1998).
Much used in the German-speaking countries but also available in more than 50 languages,
TYPO3 is used to build any type of website.
Just to have an idea of how big this CMS is, its code has been edited and improved from more than 300 contributors, and at the moment it has been installed more than 500000 times.
TYPO3 Flow was a branch of TYPO3, The team wanted to create a product that would be modern and could have been used independently from TYPO3.
After several months of development, the beta was released on August 2011, it also is an open-source product.
The latest release is the 4.2.4 and it is dated 18th October 2017.
The code is the base code of TYPO3 Neos but as said, it can be used even without the CMS.
It has been written following all the latest principle of coding such us the MVC paradigm, AOP (Aspect-Oriented-Programming), DDD (Domain-Driven-Design) and TDD (Test-Driven-Development), etc.
For this reason, the software requires version 5.3 or newest.
As per database it uses Doctrine 2 and can be interfaced with MySql and PostgreSQL.
Another interesting feature about TYPO3 Flow is Fluid;
Fluid is its template engine.
It supports all logical structures of a programming language such as condition, iterations, loops, etc, by providing a really easy syntax and avoiding the use of PHP in the template files.
I managed to speak with Mr. Christian Müller who is the community contact and he highlighted that at the moment of my writing Neos project (including Flow Framework), split off of the TYPO3 project and is now officially standalone as Neos project.
Flow Framework can now be found under the name of "Neos Flow" or just Flow, if the context is known.
There is no longer a connection to TYPO3 besides a few bits of shared code.
That said, as for the Framework, only small changes happen these days.
Christian and the team tried to get more PSR compatibility in, use composer more and more and generally gets more open towards packages and increase the size of the community.
He personally works on refactoring, SQL improvements and getting releases out.
Yii is a PHP framework that has been developed by the same creators of Prado.
To be honest, it was born as an attempt to fix all Prado problems (see Prado review).
Like others framework, it is released under the new BSD License, thus, it is possible to use it and create open-source web applications for free.
The first beta version was released in 2006 after several months of development, followed by its official 1.0 version in December 2008.
A more complete version was released in January 2010, It included a form builder, ActiveRecord, an internal unit test library and several more features that make of Yii a more complete PHP framework than its predecessor.
Since the beginning, the developers decided to maintain this project up to date with the most recent technology.
At the moment, the current version 2.0.15 has been released in March 2018 and fully supports PHP 7.
There aren’t particular features or special peculiarity but it is a pretty solid framework and among the characteristics of the latest release you will have:
MVC design pattern, internationalization, and localizations using I18N and L10N, those allow translating text and format time and dates, error handlers and loggings, security measure against XSS and cross-site request forgery, plus a testing functionality of PHPUnit and Selenium.
As you have seen numerous times above, one of the main points I am considering when I need to decide whether to start using a new PHP framework is the documentation.
Yii's documentation is second to none.
I am not saying they have the best documentation in the world but it is extremely extensive and very well thought.
It is divided in two parts,
The guide and the part concerned on the API, each of them is split by concepts, which make the research of a specific feature much easier and it is also available in several languages, including Spanish, Chinese and Polish.
Speaking of the community, the guys at Yii brought it to the next level, by creating an entire section that they call Extension, composite entirely by user contributions.
I asked Alex Makarov, one of the core maintainers of Yii PHP framework for more than 7 years to give us his impression about this framework and this is what he said:
“I think, YII is one of the most documented frameworks overall.
We're writing good API docs for everything we release and sometimes expanding the guide.
The Learning curve is low to just start but high to be good in the architecture of big projects with Yii.
Overall, Yii is great for rapid app prototyping and what's more, you can really enhance that prototype afterward, not throwing it away and re-writing.
There are many tools out of the box.
It is faster than many frameworks and doesn't cache much.
Also, it's very easy to debug in case of errors. It’s not too layered while being flexible.”
I think that Yii learned the lesson imparted by the Prado project, even though online there are still doubt about the quality of the framework surely you can taste the effort they put into it.
There are lots of controversy about Zend and its whole environment,
It is considered to be one of the most popular PHP Framework available nowadays (and the huge number of installations confirm this statement).
First released in March 2006, it is an open-source product licensed under the New BSD license.
Initially, it was a unique product,
after the version 2.5 the developers decide to create a more modular product so they split the framework into several components and it became a collection of PHP packages.
There are more than 60 components and plugin to choose from.
Among the most important you will find the Authentication, Crypt, Json, Mail, Math, Paginator, Serializer, and Validator.
Another advantage of using Zend is its predisposition to TDD (Test-Driven-Development),
Zend implements Zend_test, which uses PHPUnit, it allows you to use controllers, models, and libraries.
In order to implement PHPUnit to the project, you need to utilize Zend_tool which is the standard scaffolding utility of Zend.
As always, I keep particular attention to documentation, tutorials and here Zend is the best of the best.
Not only do they have an amazing documentation, but they went several steps further by creating training days, conferences (ZendCon), and a worldwide recognized set of certifications.
All this goes alongside the huge community of developers that use it and share its knowledge on daily basis.
As I said,
this is a good PHP framework,
but it has its downside (the quality of the code could be improved and it is definitely not the fastest framework listed in this article), but generally, it is a good framework, and its focus on marketing paid back (who can blame them for it?).
Not to mention,
the PHP Zend Certificate worth as much as a computer science degree for some HR manager.
I am sure that all of us have heard at least once people saying that PHP has died, or sentences like:
“There is Python now”,
“.NET is the new PHP”,
“Have you tried Ruby, it’s amazing”,
The reality is the PHP has changed, and it is still changing nowadays.
For a while, it seemed that version 5.5 (released in June 2013) would have been the last one,
the abandoned 6.x version and then the upgraded version to 7.0 which was very slow and this gave time to other back-end languages to rise and get more popular.
the result of this pause was the fastest version of PHP ever created, the list of features implemented its immense and on average the benchmarks between PHP 7.1 and any other the blue elephant’s language win by far.
I and several thousands of other developers all over the world breathed a sigh of relief and a smile of joy reading through the documentation released on December 2015.
Null Coalesce Operator, Spaceship, Generators, Anonymous classes are characteristics of the language that will help developers creating amazing projects for several years to come.
A special note goes to Composer, the effort made by Nils Adermann and Jordi Boggiano is unbelievable, this dependency manager has changed the way we code forever.
Just by adding a couple of files to the root of our projects and run few commands on the terminal and the power released have the potential to allow you to create the new Facebook (on the paper at least).
About the frameworks,
as we see there isn’t a unique answer to the question “Which is the best PHP framework available”?
There are a lot of questions to be made in order to answer this question;
What do you need to create?
How far is your deadline?
How fast do you want your project to be delivered?
It is really so easy to use it?
How much time do I have to learn the new syntax?
Is there a good documentation to learn from?
My advice is to evaluate all of these questions each time for each project.
Try the ones that you find more interesting for a bit and choose the ones that make you feel right.
At the same time never forget that PHP frameworks come and go,
Always focus to learn the main language features and keep up with the updates of new versions every time.
Do not forget to read
“I really had a lot of dreams when I was a kid, and I think a great deal of that grew out of the fact that I had a chance to read a lot.”
Bill Gates – Business Greatest Adventures.
I am sure we all agree that spending your time in front of a screen either coding of playing around with cloud services, version control websites and so forth is going to increase your abilities as a web developer.
But as Bill's quote says in the book written by John Brooks, another way to improve and that helped me a lot, is to read books.
From the evergreens such as “Design Patterns: Elements of Reusable Object-Oriented Software” written by the gang of four to “Modern PHP“ written by Josh Lockhart the curator of PHP The Right Way, there are an incredible amount of resources to learn from.
Be like Bill.
Some special thanks go to the following people who despite being constantly committed to realize and improve the frameworks that we developers and companies all over the world use every day have found the time to answer some of my questions that have increased the quality of this article.
Software Engineer at WeWork
for Fuel PHP and CodeIgniter
Founder - CTO at Yclas
Head of Social Media and Content Marketing at Notino
Senior Software Developer at Punctual Abstract Co., Inc
for POP PHP
Free Code Creator for TYPO3, Flow and Neos
for TYPO3 FLOW
Lead PHP backend developer at Skyeng
CTO of Radify.io
The Definitive Guide to your next PHP framework
This blog post is the third part of the Kindle book "The Definitive Guide to your next PHP framework"
- Guide to 24 PHP Frameworks Part 1
- Guide to 24 PHP Frameworks Part 2
- Guide to 24 PHP Frameworks Part 3
to see the introduction to this article and some other framework's reviews
You can click the link below to download the full version
Now I want to hear from you...
I hope you enjoyed my frameworks' comparison.
Which PHP framework have you chosen for your next project?