To try and evaluate CakePHP I made up a simple application. This was a simple car database to allow direct comparison of different makes and models comparing the following characteristics:
Price, Seats, 0-60 MPH time, MPG, Age, Road tax.
Within an hour of downloading CakePHP I had a working create, read, update, delete (CRUD) application. After 2 hours the filtering of the available fields to restrict the list to various required maximums or minimums and 20 cars details were manually entered. The application was essentially built working and tested to a basic level in 2 hours with 200 lines of code.
The real advantage though was those 2 hours were not hard pressed programming, it was a relaxed pace, and I am unsure without a framework I could get a CRUD application to the same level without a reasonable amount of planning time.
The framework does force you to work in a specific way, but brings in a number of advantages.
Less Code RequiredYes the framework overall will almost certainly have more than a basic CRUD application, but I only wrote 200 lines, which included all display code, I doubt that anyone could achieve similar functionality in the same amount of code (obviously unless they "cheat" and have multi-statement lines, single line loops etc...)
This brings the sub-benefits of:
- Higher quality code - The less you need to write the easier it is to maintain concentration on higher quality easier to understand code.
- Fewer bugs - Every extra line invites the possibility of error, either logical or even simple spelling mistakes.
- Reduced maintenance - Fewer lines to read means more time spent fixing an issue and less time finding it.
More code reuseThe framework will contain methods and helpers for common coding issues, rather than re-writing these simple methods, or possibly worse writing lots of semi-duplicate methods throughout your code because you lack the appropriate planning / refactoring time.
When you approach a new project you can tackle in a multitude of ways, a framework can help take a consistent and proven methodology to solving the issue and significantly reduce planning requirements.
While raw performance of applications may be considered an issue CakePHP has a number of built in performance indicators and actively helps you spot performance problems before they have impacted on your users. My application was perhaps too basic to demonstrate any potential scaling issues, but there is certainly plenty of control over the code to prevent performance being a likely blocker to the implementation of CakePHP in a project.