An overview of famous frameworks

You already have a good idea about what a framework can offer and what types there are. Now, it is time to review some of the most important ones out there so that you get an idea of where to start looking for your next PHP web application. Note that with the release of PHP 7, there will be quite a lot of new or improved PHP frameworks. Try to always be in the loop!

Symfony 2

Symfony has been one of the most favorite frameworks of developers during the last 10 years. After reinventing itself for its version 2, Symfony entered the generation of frameworks by modules. In fact, it is quite common to find other projects using Symfony 2 components mixed up with some other framework as you just need to add the name of the module in your Composer file to use it.

You can start applications with Symfony 2 by just executing a command. Symfony 2 creates all the directories, empty configuration files, and so on ready for you. You can also add empty controllers from the command line. They use Doctrine 2 as ORM, which is probably one of the most reliable ORMs that PHP can offer nowadays. For the template engine, you will find Twig, which is the same as what we used in our framework.

In general, this is a very attractive framework with a huge community behind it giving support; plus, a lot of companies also use it. It is always worth at least checking the list of modules in case you do not want to use the whole framework but want to take advantage of some bits of it.

Zend Framework 2

The second big PHP framework, at least since last year, is Zend Framework 2. As with Symfony, it has been out there for quite a long time too. Also, as with any other modern framework, it is built in an OOP way, trying to implement all the good design patterns used for web applications. It is composed of multiple components that you can reuse in other projects, such as their well-known authentication system. It lacks some elements, such as a template engine—usually they mix PHP and HTML—and ORM, but you can easily integrate the ones that you prefer.

There is a lot of work going on in order to release Zend Framework 3, which will come with support for PHP 7, performance improvements, and some other new components. We recommend you to keep an eye on it; it could be a good candidate.

Other frameworks

Even though Symfony and Zend Framework are the two big players, more and more PHP frameworks have appeared in these last years, evolving quite fast and bringing to the game more interesting features. Names such as CodeIgniter, Yii, PHPCake, and others will start to sound familiar as soon as you start browsing PHP projects. As some of them came into play later than Symfony and Zend Framework, they implement some new features that the others do not have, such as components related to JavaScript and jQuery, integration with Selenium for UI testing, and others.

Even though it is always a good thing to have diversification simply because you will probably get exactly what you need from one or the other, be smart when choosing your framework. The community plays an important role here because if you have any problem, it will help you to fix it or you can just help evolve the framework with each new PHP release.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.199.181