Back in 2007 I was tasked with evaluating php frameworks and making a recommendation for which framework to become the new standard for building web apps at a previous employer.
The major contenders at the time were: CakePHP, CodeIgniter, Symfony, Zend, and (re-)writing our own in house framework.
Before looking closer at any of the possible solutions, I wrote a set of requirements based on what I thought was most important for a growing company with programmers of very different skill levels and experience.
Requirements:
Goals:
Users:
The developers at the company had very diverse backgrounds, from software engineering to bedroom web hacking. Up until this point most of the projects had been done either by a single developer or as a team of two, and management had expressed interest in increasing team sizes for projects and implement a "revolving" team in order to reduce burn out.
Application:
The main application of the framework was for developing a large integrated web app based on smaller modular apps. It would also be used for developing small one-off custom apps and sites.
Environment:
The production environment was a Debian based LAMP setup, partially maintained by the hosting company.
The development environment used was based on XAMPP with ZendStudio as the IDE and Subversion for SCM.
Our own custom framework
We had a simple PHP5 based framework, written by a single developer with little time for testing and "designed" with little regard for actual use by others. It mixed and matched business logic with presentation and was as far from DRY as you could get.
Pros:
Cons:
CakePHP
CakePHP is a wholly Ruby on Rails inspired framework, designed around agile principles like DRY and Convention Over Configuration.
Pros:
Cons:
CodeIgniter
CodeIgniter is small and lightweight, bordering more on the side of library then framework. It aims to provide fast functions with as little configuration and overhead as possible and to generally stay as much out of your way as possible.
Pros:
Cons:
Symfony
Originating as a fork of Mojavi3, Symfony has taken inspiration form Ruby on Rails for many features and integrated other existing PHP open source projects for some of it's features. It has a clean design and follows agile principles like DRY and KISS.
Pros:
Cons:
Zend Framework
Zend framework is an enterprise oriented framework designed "with simplicity in mind. To provide a lightweight, loosely-coupled component library simplified to provide 4/5s of the functionality everyone needs and that lets you customize the other 20% to meet your specific business needs."
Pros:
Cons:
Conclusion:
As soon as I had written a small test app in CakePHP and read the code for some of the larger open source apps based on it, it became clear to me that CakePHP would best meet the most critical of our needs. In particular its "convention over configuration" philosophy and console baking functionality would help us make our programs conform to a common standard regardless of individual developer preferences and habits.
Before adopting CakePHP as our framework, the management wanted input from the rest of the developers on which framework they thought was best: CakePHP or Zend Framework.
The result was 5 votes for Zend vs 2 votes for CakePHP. After some discussion, taking into account the arguments for and against the two options, the decision was made - CakePHP would become our standard.
After a fairly long in house training period, including feedback and assistance from the core CakePHP team, we managed to develop some nice apps and publish these articles on the Bakery:
Since then most of the frameworks have matured and improved and some new have arrived on the scene, but I still feel CakePHP was the right choice in our situation. For those who are looking to try CakePHP, I would like to give this advice: Leave your preconceptions and old ways behind and approach CakePHP with an open mind. The initial learning curve can be steep, but once you internalize the conventions of CakePHP, you may find yourself wondering how you ever got anything done before!