It has been quite a while since I have last messed up with CakePHP but recently due new projects CakePHP has come into my horizon again.
As usual, before facing a project, I always study the environment, the frameworks and everything that can help me jump-start and today I was a bit impressed with CakePHP.
Basically the MVC structure is there, but, at least at first, there isn’t much you need to do to work it up. Create your Model that will hold the table information, you will need to create the controller that will hold your actions and finally the views.
What impressed me the most on Cake was the model layer.
Take for instance the Model class Cars. The file name will be called cars.php (under the models directory) and the table name will be cars. If every variable that you have match the column name, there is nothing else you will need to do to construct a brand new model. In another words instead of programming 8 hours for a full model class, you will program 1 hour. In the business world this means profit.
Another amazing function that CakePHP provides to talk directly to the Model class without you even seeing anything of a query is the find.all function.
Check this line of code:
Basically you are telling in the Controller that you will be setting the view variable cars with all cars that the Model class can find.
I will keep this post short, got get back to the coding and study, but here is how I will rate CakePHP:
- Database Config:
- General Config:
- Comparison to Zend Framework: Not yet rated (after I complete the full app, I will be able to rate this)