If you are looking into using a framework for your PHP development, you bet it can be no better that CakePHP. This framework is an open-source development tool minimizing the architectural headaches and employing many features from Ruby on rails; although not exactly a port of RoR to PHP. The star feature is the MVC architecture i.e. Model-View-Controller. This is a three part way of programming and designing your apps so that code does not interfere with design. It keeps your code clean. It lets you leave all the low level tasks you needed to do when building your app from scratch. Sounds great, doesn’t it. But there is a huge learning curve with this framework. This kind of architecture needs time getting used to plus all the conventions and rules that have to be adhered. The CakePHP team provides online tutorials and documentation for beginners reaching to the intermediate level. For some, it has been quite easy to survive the shift while there have been few with no hope.
CakePHP was started in 2005 amidst the monopoly of Ruby on Rails. Since then it has faired well largely owing to the spread of PHP and the need for a framework with standardized features and good support. What People loved about this framework was that with all that powered, it did not need any eXtra expenses; you could have a 5 bucks a month server host any kind of CakePHP app. CakePHP shows compatibility with both PHP 4 and PHP 5. That was some good news to me of course. CakePHP offers database management in a better manner via CRUD integration. All you basic DB needs are taken care of, thanks to the bakery. Application scaffolding was a major like among the programmers. Application scaffolding helps you to generate CRUD templates automatically which is good enough for testing you DB with the app. Scaffolding cannot be easily modified so its not something for deployment. Its a feature you’d love while prototyping. Built-in validation can save you loads of time and leave the hassles of taking inputs and interacting with the user. Data sanitization saves you from all that unnecessary code needed for protecting your app from injection attacks. Such small and handy features have saved a lot of my time building apps and focusing on what really matters; the quality. An yes, they also provide Helpers. These are small routines to integrate various often-needed functionalities to your app. Helpers save the majority of your development time when compared to coding from scratch.
Somethings that were needed are still not implemented yet. My favourite from RoR was Migrations. It allows you to change your database in any manner without worrying about your SQL queries. Now I have to keep track of every query that had been made in the entire app.
Also, when comparing to Ruby on Rails, I find CakePHP to be quite dry with syntax. CakePHP has too much of array usage. It can irritate any beginner or seasoned programmer easily. Deployment is although a Cake forte. Any app on CakePHP requires minimum configuration time when deploying on a server. Compared to Ruby on Rails, its ‘cakewalk’. With all that said, I hope you try out CakePHP to forge out good quality apps.
Source by Saurabh Datta