PHP Framework Comparison
Yes this is yet another PHP Framework comparison. A few months back I was trying to decide which PHP framework to use on a project. I wanted to use a currently popular framework because that way I would get the best support from the devoted contributors and users. Choosing a popular or active project is important when dealing with open source tools.
From my research I found that cakePHP, Zend Framework, and codeIgniter are currently the most popular PHP frameworks. Below are my notes and thoughts about of each framework.
Some of this will only make since if you are familiar with MVC frameworks, if you are not read this first http://en.wikipedia.org/wiki/Model-view-controller
cakePHP
Google results
- 4.75 million (term: cakephp)
Books
- Beginning CakePHP Novice Professional
- Practical CakePHP Projects
- CakePHP Application Development Step by step
Mailing List/Forum Activity
- Mailing list is a google group: http://groups.google.com/group/cake-php?pli=1
- seems to very active with around 2k posts a month. More details here http://groups.google.com/group/cake-php/about
Pros
- CoC type development
- Has a scaffolding option that allows you to test your basic database and model design without having to create a single view.
- Model relationship management. CakePHP has built in functionality to automatically load arrays of related model entities based on your model and database design. These are stored in model propeties named $belongsTo, $hasMany, and $belongsToAndHasMany. You can even control if cakePHP should load the related models, in case there is instance you don’t them.
- Automated code creation with bake script. The bake script generates controller methods, models, and even views. You can then edit them to learn more about how to use cake correctly.
- Focus is to keep the controllers light by having most of the functionality in the model or in something called a behavior which could be seen as a simple service layer
Cons
- I find the layout of the actual cakephp.org site confusing. For example the main menu has two items that at first glance I have no idea what they mean Bakery and Forge.
- Very array based. Which not really a bad thing most PHP frameworks and applications are array based. When possible I would rather use objects instead of arrays. Defined methods and properties can make coding a lot easier.
Notes
- Can be used by a novice or veteran PHP developer. Very similar to CodeIgniter. Very different from ZendFramework.
Zend Framework
Google results
- 4.63 million google results – (term: “zend framework”)
Books
- Zend Framework In Action
- Architects Guide to Programming Zend Framework
- Zend Framework Official Programmer Reference
- Beginning Zend Framework
- Pro Zend Framework CMS Building
Mailing List/Forum Activity
- Moderately active. Couldn’t tell exactly how active because the archive does not show dates
- http://framework.zend.com/wiki/display/ZFDEV/Mailing+Lists
Pros
- requires PHP 5.1.4 or newer. To me this is a pro because it forces you to use PHP5 which is more object oriented. Some may see this as a con.
- can pick and choose which features you want to use. A more open development path. Which is good for experienced developers.
Cons
- Doesn’t seem to follow CoC as much as cakePHP or CI
too much “just because” configuration.
Notes
- More for a veteran PHP developer. Very different from CakePHP and
CodeIgniter
I would definitely buy a book to help evaluate this framework fully.
CodeIgniter
Google results
- 714k google results – (term: codeigniter)
Books
- Professional CodeIgniter
- Practical CodeIgniter Projects Building
- Creating Microsite Manager with CodeIgniter
Mailing List/Forum Activity
- Very active.
http://codeigniter.com/forums/
Pros
- the manual/tutorial is excellent
- concise framework that allows u to get started very quickly
Cons
- Did not come with .htaccess file (problem for people new to apache)
- A lot of duplication in the controllers. A controller heavy framework
Notes
- Can be used be a novice or veteran PHP developer. Very similar to CakePHP. Very different than Zend Framework.
Related Posts
Comments
17 Responses to “PHP Framework Comparison”
Leave a Reply








totally agree about the codeIgniter docs. they rock!
Here is a list of PHP frameworks sorted via votes.
http://www.phpframeworks.com/top-10-php-frameworks/
Thanks for the interesting comparison. Just wondering…Which of the popular PHP frameworks is the LEAST object-oriented?
@NoseyParker – From the three listed above cakePHP is the LEAST object oriented.
Zend Framework is the only one with a Certification…
1. CakePHP is when you need a full stack framework for web applications.
2. Zend Framework is when you need to glue code together with other solutions or decoupled code.
3. Codeigniter is for create quick and easy way websites.
Symfony any good? I just found this description of the framework here http://ksojkotech.wordpress.com/2009/08/17/why-symfony-is-the-best-framework-to-start/
I am a non-php developer who wouldn’t mind learning it, so that 24 day tutorial looks quite appealing to me.
@MikeNereson – Symfony is very popular. I will we adding a comparsion of that framework soon. For someone new to php I would try codeigniter. I can’t say how easy symfony is because I haven’t tried it yet.
Good job,those are TOP 3 of all of php frameworks from the phpframeworks.com ’s vote.
1 CodeIgniter (69 votes)
2 Zend (51 votes)
3 CakePHP (51 votes)
http://www.phpframeworks.com/top-10-php-frameworks/
@Chad – I also hear a lot about symfony. Packt just sent me a book on symfony I will post a review on it next month or so.
yeah.. ur right.. I used codeigniter…. easy to use and great docu..
its all ok. But the best one, which i think is Symfony. Try it!!! It is full of OOPS concept.
Nice post! I think, for starters I will use CodeIgniter or cakephp. Thank you
I did some comprehensive performance benchmarks of all the latest PHP MVC Frameworks including Yii 1.1.1, Kohana 2.3.4 and Code Igniter 1.7.2 as well as others. The results and analysis of results is here: Comparing PHP MVC Framework Performance
I suggest the yii framework.
http://www.yiiframework.com/
PHP Framework Comparison…
A comparison between the most popular php frameworks: cakePHP, Zend Framework, and codeIgniter….
[...] http://blog.codehangover.com/strange-loop-2009-day-2/ php var dzone_style="2";Related PostsStrange Loop 2009 – Day 2Strange Loop 2009 – Day 1 [...]