Guide to 24 PHP Frameworks (Part 4)
Guide to 24 PHP Frameworks (Part 4)
In the final part of this series, we take a look at six interesting PHP frameworks. Have tried any of these frameworks out in your projects?
Join the DZone community and get the full member experience.Join For Free
Follow the Series
This blog post is the fourth and last part of the"Definitive Guide to Your Next PHP Framework" series.
If you did not read it yet, you can check the other blog posts following the links:
Introduction to the Fourth, and Final, Part
We are finally here.
Right now, you can consider yourself 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 frameworks that I consider to be the best among the 24 frameworks presented in this series.
My advice, again, is to read through all the reviews in these posts while keeping in mind what do you need to create in order to choose the perfect fit for your project.
Table of Contents
There isn’t a lot of information on the internet about this framework.
The project was 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 has been updated regularly.
At the moment, the latest stable version is 3.7.5, released on April 25, 2018.
Like some of the frameworks covered in previous articles, it is a free, open-source product under the BSD license, and it follows MVC architecture patterns by mixing multi-tier and middleware architectures.
Why would you choose it over other frameworks?
Well, on the official website, the owners claim 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 was started in 2005 by Fabien Potencies, CEO at SensioLabs and Blackfire.io.
In its first version, Symfony supported PHP 5.0 and just a couple of features. Since then, it has increased in popularity and reliability, becoming one of the three most popular frameworks, just after Laravel and CodeIgniter, and the most used PHP framework by enterprise companies.
Symfony is composed of sets of several PHP components that merged together to form the framework.
Since its initial release, it has been updated on a regular basis, with at least two new versions released per year.
Until now, all of the different releases have at least eight months of support and, in some cases, support has continued for up to three years.
There are five different versions currently on an LTS release; 2.7 and 2.8, which were released in 2015, while versions 3.4 and 4.0 was released in November 2017. The newest version is 4.1 and which was released in May 2018 and supports PHP 7.1.3 and newer.
As I said earlier, 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 worth mentioning 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 is self-explanatory.
A PHPUnit bridge reports legacy tests and deprecated code, as well as security, translation, routing, and validator components.
One of the amazing characteristics of this framework is its documentation. The coders who are developing this project not only have created a very detailed set of docs but there is an explanation for each of the components. There are also tons of people talking about this framework and it has 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 of investing.
This rule says that it is a very good idea to focus on a blue-chip company, with a very famous brand and decades of successfully divided payment.
Here, we have a blue-chip PHP framework, from which other different frameworks were born.
For example, Laravel, even though it has a more contemporary style, started and is still massively based on Symfony components.
This is some proof that if you like its traditional style, Symfony is undoubtedly the framework with which to start.
This is a little framework that makes ease-of-use its trademark.
It is an open-source framework, licensed under the GNU license.
It contains several features that can be implemented with only a couple of lines of code.
TwistPHP was 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 the years, this software has 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 for connecting to the database and creating MySQL queries. The way it has built facilitates its extendibility and reliability.
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 German-speaking countries but is also available in more than 50 languages, TYPO3 is used to build any type of website.
Just to give 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 500,000 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 in August 2011 — it also is an open-source product.
The latest release is the 4.2.4 and it is dated October 18, 2017.
The code is the base code of TYPO3 Neos but, as stated, it can be used even without the CMS.
It has been written following all the latest principles 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 newer.
As for databases, 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,s 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 this, the Neos project (including Flow Framework), split off of the TYPO3 project and now officially stands alone as the Neos project.
The Flow Framework can now be found under the name "Neos Flow" or just Flow if the context is known.
There is no longer a connection to TYPO3 other than 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 get more open towards packages and increase the size of the community.
He's personally working 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 the problems with Prado (see Prado review).
Like other frameworks, 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 Yii a more complete PHP framework than its predecessor.
From the beginning, Yii developers decided to keep this project up-to-date with the most recent technology.
The current version 2.0.15 was released in March 2018 and fully supports PHP 7.
There aren’t particular features or special peculiarities to Yii, 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, that allow for the translating of text and to format time and dates, error handlers and logs.
Security measures against XSS and cross-site request forgery.
The testing functionality of PHPUnit and Selenium.
As you have seen numerous times above, one of the main points I consider 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 out. It is divided into two parts: the guide and the part concerned on the API, each of which is split up by concepts, making the research of a specific feature much easier. The docs are also available in several languages, including Spanish, Chinese and Polish.
Speaking of the community, the devs at Yii brought it to the next level, by creating an entire section that they call Extension, composed entirely by user contributions.
I asked Alex Makarov, one of the core maintainers of Yii, to give us his impressions 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, rather than throwing it away and re-writing it. 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.”
In conclusion, I think that Yii learned the lesson imparted by the Prado project. Even though there are still doubts about the quality of the framework among some developers, surely you can feel the effort they put into it.
There's lots of controversy about Zend and its whole environment. It is considered to be one of the most popular PHP frameworks available (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, but after version 2.5 the developers decided 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 plugins to choose from.
Among the most important you will find are: 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, which allows you to use controllers, models, and libraries. In order to implement PHPUnit in your project, you need to utilize Zend_tool which is the standard scaffolding utility of Zend.
As always, I pay particular attention to documentation and tutorials, and here Zend is the best of the best. Not only does it have amazing documentation, but the docs writers 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 their knowledge on a daily basis.
As I said, this is a good PHP framework, but it has its downsides (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 has paid off (who can blame them?).
Not to mention that the PHP Zend Certificate is worth as much as a computer science degree for some HR managers.
I am sure that all of us have heard people saying least once that PHP has died, or sentences like:
The reality is that PHP has changed, and it is still changing.
For a while, it seemed that version 5.5 (released in June 2013) would be the last one, as the 6.x version was abandoned and the upgraded 7.0 version was very slow, this gave time to other back-end languages to rise and get more popular.
Yet, the result of this pause was the fastest version of PHP ever created, with a list of features implemented that is immense.
I and several thousands of other developers all over the world breathed a sigh of relief and a gave smile of joy reading through the documentation released in December 2015.
Null Coalesce Operator, Spaceship, Generators, and 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 running few commands in the terminal the power released has the potential to allow you to create the new Facebook (on paper at least).
As we've seen there isn’t a really an answer to the question, “Which is the best PHP framework available”?
There are a lot of questions to be answered in order to answer this question:
What do you need to create?
How far off is your deadline?
How fast do you want your project to be delivered?
Is it really so easy to use it?
How much time do I have to learn the new syntax?
Is there 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 on learning 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.
Now, 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 realizing and improving 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.
Phil Sturgeon; https://philsturgeon.uk/; Software Engineer at WeWork for Fuel PHP and CodeIgniter
Chema Garrido; https://chema.ga/; Founder - CTO at Yclas for Kohana
Tomáš Votruba; https://www.tomasvotruba.cz/; Head of Social Media and Content Marketing at Notino
Milan Šulc; https://f3l1x.io/; freelancer DevNinja for Nette
Nick Sagona; https://nicksagona.com/; Senior Software Developer at Punctual Abstract Co., Inc for POP PHP
Christian Müller; https://www.flownative.com/; Free Code Creator for TYPO3, Flow and Neos for TYPO3 FLOW
Alexander Makarov; https://en.rmcreative.ru/; Lead PHP backend developer at Skyeng for YII
Nate Abele; http://radify.io/; CTO of Radify.io for Li₃
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
Now I Want to Hear From You!
I hope you enjoyed my framework comparison.
Which PHP framework have you chosen for your next project?
Published at DZone with permission of Nico Anastasio . See the original article here.
Opinions expressed by DZone contributors are their own.