Introduction
According to w3tech, PHP is the most popular server side programming language in the world. So you can only image how many developers use PHP on a daily basis.
Given PHP’s popularity and the need for complex applications, PHP frameworks have grown to be handy tools for building web applications. PHP frameworks allow developers to build more complex, secure and well structured web applications faster and better.
A PHP framework is a tool, written in the PHP programming language, that consist of reusable code and components pulled together to form a standard architecture for rapid and secure development. Frameworks help to prevent developers from recreating common functionalities from scratch every time they start a new project. These common functions include things like routing, authentication, database access, session management etc.
Some developers even create their own frameworks without realising it, by creating their own library of common functionalities and reusing it for new projects.
As a developer, you may like that approach instead of using a framework because you know and understand all the code in the application. I know I did when I started out, but using a well maintained framework is much better.
Here are some benefits you gain by using a framework.
- It has the support of a community of developers working on it
- Built with time tested security policies, methods and best practices
- Rapid development and saves time for developers
- Reusable code and components resulting in structured and maintainable web application
- Promotes Object-Oriented Programming (OOP) methods and tools
- Documentation to have all developers on the same page and get onboard quickly.
You are not required to use a framework and will not get struck by lighting if you don’t. Feel free to create your own, given you have the skills and experience, and create the next hip framework in town. After all, frameworks were built by people like you and me.
Let’s dive into the list of PHP Frameworks you can use for rapid web development.
1. Laravel
First on the list and my personal favorite is Laravel. Laravel is the most popular PHP framework on the market. It was created in 2011 by Taylor Otwell as an attempt to provide a more advanced alternative to the CodeIgniter framework.
Laravel is currently at version 5.6 and is growing quickly with its large active community. Laravel allows developers to quickly develop applications and set up user authentication with very little effort.
You can find many really good video tutorials and help on Laracast.com to get started. Laravel’s documentation is well written and easy to follow. Have a look and see for yourself.
Cool websites that are built with Laravel:
Points to note:
- Laravel’s github account has 44,019 stars and 4,556 watches.
- A general job search for laravel developers on indeed.com displayed 539 job post.
2. Symfony
Symfony is a PHP framework that includes a set of reusable libraries allowing developers to choose what they need and don’t.
It is a mature framework and was published in 2005 with the goals of speeding up the creation and maintenance of web applications and replace repetitive code tasks. It also gives full control over the configuration, permitting developers to customize everything.
Known for its very stable, high performance, well documented and modular ecosystem, Symfony is used by popular websites like Drupal and Magento. It is also the foundation on which Laravel was developed. Even though it is a mature framework, Symfony, currently in version 4.1, has no intentions of slowing down.
Points to note:
- Symfony’s github has 17,950 stars and 1,302 watches.
- A general job search for symfony developers on indeed.com displayed 249 job post.
3. CodeIgniter
CodeIgniter is a lightweight and easy to install framework. Released back in 2006, Codeigniter was built for developers who need a simple and elegant toolkit with nearly zero configuration.
It is loosely based on the Model-View-Controller design pattern allowing you, unlike other frameworks, to make Models and Views optional. CodeIgniter gives the developer great freedom to use it as they like.
CodeIgniter has clear, easy to read documentation, user guides, tutorials and references.
Some sites built with CodeIgnitor are Mail and Guardian, Freedcamp and Nissan.
Points to note:
CodeIgniter’s github has 16,258 stars and 1,764 watches. A general job search for codeIgniter developers on indeed.com displayed 108 job post.
4. CakePHP
CakePHP is another 10 year old plus PHP framework that was created in 2005 by Michal Tatarynowicz.
CakePHP is a modern PHP 7 framework offering a flexible database access layer and a powerful scaffolding system that makes building small and complex systems simpler, and easier.
It was inspired by the Ruby on Rails framework and uses many of its concepts. Companies such as BMW, Hyundai and Express have used CakePHP to build their sites. Having a long history, CakePHP is currently at version 3.6 and still has an active community.
Points to note:
- CakePHP’s github has 7,576 stars and 667 watches.
- A general job search for cakephp developers on indeed.com displayed 82 job post.
5. Phalcon
Last but not least we have the Phalcon framework. Known for being the fastest PHP framework ever built.
The Phalcon framework is new compared to most frameworks. It was created in 2012 by Andrés Gutiérrez and collaborators with the purpose of looking for a new approach to traditional PHP frameworks.
Unlike other frameworks, Phalcon is a full-stack PHP framework delivered as a C-extension which makes it so blazing fast with low resource usage. Some of its features consist of built in security, caching, assets management, MVC design pattern and lower overhead.
The Phalcon documentation states that you can build an app in less than 15 minutes. It’s community is not as strong as the previous frameworks but they are still active. Maybe that will change over the upcoming years. The framework is currently at version 3.3 and they have already started development on version 4.0.
Here are a few websites that were built with Phalcon:
Points to note:
- Phalcon’s github has 9,010 stars and 737 watches.
- A general job search for phalcon developers on indeed.com displayed 8 job post.
Wrapping it up
Whichever framework you choose is not as crucial as you may think and you do not have to learn all of them.
What matters, is how well you understand the underlying language that the framework is built on. This allows you to use and learn a framework quickly and does not get you attached to a framework.
There are many PHP frameworks available on the market and sometimes it can be very difficult to know which one you should learn, use, or focus on.
I hope this article helped you to narrow it down to make your decision and get started with creating cool applications quickly.