CakePHP Application Development
3 comments | Posted: 11 January 09 in Books, by Yannick Lyn Fatt
Back when I first started using PHP web frameworks, CakePHP was one of those touted as being the best and followed Ruby on Rails very closely. I decided to give it a try, however, I didn’t find it quite as easy as some had said it was. Add to that, the fact that the documentation wasn’t so great at the time either. It has certainly come a long way since then and is still regarded as one of the best PHP web application frameworks out there. I’ve been meaning to give it another try and since Packt Publishers was kind enough to send a review copy of CakePHP Application Development by Anupom Syam and Ahsanul Bari to us, it was the perfect time for me to revisit CakePHP and give it a second chance.
The book is really targeted at people just getting started with CakePHP. You can expect to get step by step instructions on using the framework and the “What just happened?” sections do a pretty good job of letting you know and understand why you did what you just did in the preceding steps.
As you might also expect from an introductory book on a web application framework, you’re taken through the basics of the MVC (Model-View-Controller) architecture, told how CakePHP makes building web applications faster and shown how to get CakePHP initially setup and working on your web server. Next you’re taken through the creation of a simple To Do list application. Models and Controllers are explained in more detail, in addition to relationships between database tables and helpers for your views.
CakePHP also comes with some shell scripts that can automate repetitive tasks so as to speed up development. Essentially you can generate Models from an existing database, as well as Controllers and Views with basic CRUD functionality for your application. Chapter 8 speaks to this and it was something that I didn’t know was possible with CakePHP. After going through the chapters up to this point and typing out the basic structure of Controllers, Models and Views over and over, you come to appreciate the automation made available by the shell scripts.
In the remaining chapters a sample application will be built called “Quick Wall”, a quick way to ask questions and give answers. This uses all that you’ve learnt thus far throughout the book and also demonstrates how to build in an authentication system, pagination, RSS, integrate AJAX functionality, and tidy up the application with a few extra helpers. I really liked the last few chapters as I know many times people learn the individual components of frameworks but have a hard time trying to fit the pieces together. The Quick Wall application did a good job of demonstrating how to do this.
All in all I would recommend this book to anyone just getting started with PHP web application frameworks and especially those wanting to learn CakePHP.
Discuss This Topic
Comments closed after 2 weeks.