PHP is by far the most popular server-side programming language to create web applications. In the past years a lot of frameworks for PHP has emerged. PHP frameworks offers developers a platform to create more complex, secure, and standardised web applications in the fasted way possible. There are so many PHP frameworks available and each of them is different as it targets developers with different skill levels, hosting platforms, and complexity.
One of my biggest challenges is: “Which one should I learn first?” then also: “Is it worth it?” To choose the right framework to learn depends on the type of applications you are going to, or want to, develop.
As with all things in life, there are pros and cons to each framework, here is a quick summary of the pros and cons for some of the most popular PHP Frameworks.
Laravel is the most popular PHP framework at this time as it is designed for rapidly building web applications using the MVC design pattern. Some of the most noted features of Laravel is that it comes with a lightweight templating ening, a packaging system, unit testing, RESTful controllers, and it handles noSQL structures easily.
- The file structure and code is very organised and easy to understand
- Utilises the MVC architecture
- Built in unit testing
- The documentation is thorough and the best of any of the frameworks
- Overloading capabilities
- A lot of functionality in the core
- Laravel does not work on shared hosting environments
- The amount of queries performed is very high
As their website states: “Symfony is a set of PHP Components, a Web Application framework, a Philosophy, and a Community — all working together in harmony.” Symfony has been described as a very stable, high performance, well documented, and modular project. Symfony is backed by the French SensioLabs, and has been developed by them and it’s community.
- High performance, due to byte code caching
- Well documented, maintained, and supported
- Very good support and is very mature
- While the documentation is good, there is a steep learning curve.
- Companies are moving to MVC Framework architectures and Symfony2 does not support MVC.
Codeigniter is an ideal framework for rapid application development. It’s a lightweight, low-hassle, framework with a small footprint that can be installed just by uploading it directly to your hosting. No special command line or software installation is required. Upload the files and you’re ready to go.
- It is very developer friendly, as it doesn’t need any special dependencies or supports
- It has the ability to use normal web hosting services well
- Uses standard databases such as MySQL
- Outperforms most other non MCV frameworks
- Very well written documentation and long term support
- It doesn’t have namespaces, however this can speed up the application
- Not as friendly towards unit testing as others
- Few libraries that are built inside the framework
Is it worth using a framework?
Although frameworks is a very good tool to use, it does come with some cons. The biggest one is that it is developed by a community. You may think this is the best reason to do so, but in reality there will be thousands of people who know exactly what your application is based on and with that, if there are any vulnerabilities anyone can exploit your systems.
On the other hand, if you are creating systems you should look at the type of system you are building and see what is the best possible way to do so. Evaluate firstly if a framework is a good option for you, and if it is read up on the frameworks available and see which one is designed to fulfill your needs.