Best php frameworks for 2015?
As one of the most popular platforms web development, PHP has been used by web developers worldwide. Using the best PHP frameworks facilitates scalability and long-term maintenance. It helps you to comply with development standards, keeping your code organized. And also allows your application to evolve and grow over time.
But which Framework should I choose? which ones are the best php frameworks? I share here my experience with them. I hope this guide may help you.
Zend Framework (ZF) is an open source, object-oriented web application framework. It is implemented in PHP 5 and licensed under the New BSD License.
There are a wide range of functions providing improved interfaces to the challenging tasks web developers face with daily. It doesn’t have its own Model implementation. Therefore the developer is free to use whatever means he has to implement it, or even just integrate existing implementations.
+ Zend Framework is a fully object-oriented framework. And there are lots of ZF components that you can load as you need.
– Zend framework does not use much code generation and its configuration is situated in the front controller. The learning curve is hard.
#4 Code Igniter
CodeIgniter is a powerful PHP framework with a small footprint. It requires nearly zero configuration, with no restrictive coding rules. It offers simple solutions to complex application requirements.
It uses the MVC controller approach, it allows for great separation between logic and presentation. Therefore if you are working with a designer, don’t worry, you can let him do the templates ;). And it is the easiest learning curve I ever had.
+ The best point for Code Igniter is the simplicity and it has great documentation. Easy to learn.
– No auth class, the routing is too linear, it has global functions (!) . It doesn’t provide in-built Ajax support
#3 Yii Framework
Yii is an open source, object-oriented, component-based MVC PHP web application framework.
Its component-based design allows you to customize it for our needs without directly modifying it. Yii comes with a collection of official documentation, such as a tutorial to develop a simple blog application. And it also has guide that gives the description of every feature and a class reference which gives every detail about properties, methods and events.
The Yii project has an extension repository consisting of user-contributed components, and it is carefully designed to work well with third-party code. These features make Yii Framework in my opinion, one of the best PHP frameworks.
+ Nice CRUD and models generators. Built-in Ajax suport for Grids. Lots of extensions, built-in authentication/authorization. Smooth learning curve.
– Yii development team follows their coding style. Yii2 uses namespaces, although you can define global classes without namespaces.
Symfony is a flexible, scalable and powerful PHP framework for MVC application. Symfony aims to speed up the creation and maintenance of web applications and to replace repetitive coding tasks.
The Symfony community is huge, and makes heavy use of existing PHP open-source projects as part of the framework like Doctrine, Twig, Swift Mailer. It also makes use of its own components, which are freely available on the Symfony Components site. To match enterprise development guidelines, Symfony is bundled with additional tools to help developers test, debug and document projects.
Another great tool is Symfony CLI, the Console component allows you to create command-line commands. Your console commands can be used for any recurring task, such as cronjobs, imports, or other batch jobs. These features make Yii Framework in my opinion, one of the best PHP frameworks.
+ Symfony is developed fully with Object Oriented approach. There are plenty of reusable PHP component, and works great with composer. Symfony has a great php architecture, including design patterns and good practices.
– Symfony comes bundled with many 3rd party libraries (which one might not be using at all). This also makes Symfony slightly slower in the run-time.
Laravel is a free, open-source PHP web application framework. It is intended for the development of web applications following the (MVC) architectural pattern.
Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar. The source code of Laravel is hosted on GitHub and licensed under the terms of MIT License.
Laravel’s command-line interface (CLI) is called Artisan. The features of Artisan are mapped to different subcommands of the artisan command-line utility, providing functionality that aids in managing and building Laravel-based applications. Common uses of Artisan include managing database migrations and seeding, publishing package assets, and generating boilerplate code for new controllers and migrations. The latter frees the developer from creating proper code skeletons. The functionality and capabilities of Artisan can also be expanded by implementing new custom commands, which, for example, may be used to automate application-specific recurring tasks.
The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database. Each database table has a corresponding “Model” which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table. These features make Laravel in my opinion, one of the best PHP frameworks.
+ The community is excellent. Laravel docs and tutorials can even help you to understand how MVC works. Eloquent syntax is simply great, folks, it’s not possible to write more readable code in PHP. Works great with composer. And a simple and easy-to-use approach to routing.
Committing to a PHP framework takes some consideration. Which one is the best php framework? My favourite one is Laravel, because is great and pretty. Symonfy is great too, and you can use 3rd party bundles, but it heavy, and I prefer Eloquent over Doctrine. And between Laravel and Yii2, there’s no clear winner, I prefer the Laravel syntax, but the features are very similar. It’s up to you to decide which one suits you best.
Apart from that, some are better suited for specific tasks. For example, if I had to develop a fully ajax-based web applications, I would definitely choose Yii framework ; and if you are beginning with php frameworks, try Code Igniter, very easy to learn and with great documentation.