Book review: CakePHP Application Development

Nice folks over at Packt Publishing asked me to a do a review of a book they’ve recently published, called “CakePHP Application Development“, by Ahsanul Bari and Anupom Syam. I was quite happy to oblige and not only because I got a free book, but also because I’ve been meaning to see if some of these new books about CakePHP would do a good job giving justice to such a cutting-edge framework.

I felt that it must be pretty tough for authors, editors and publishers to accomplish a book, especially the one which covers CakePHP 1.2, when the framework is constantly evolving. To my, perhaps, surprise the book actually happened to contain very up-to-date material. Overall, it accomplished the task of introducing (and advancing) one into the world of CakePHP quite well. 

What I liked…

First and foremost I enjoyed the fact that the book was very much example-driven. To me it’s just a preferred way of learning: study a functional example, try to figure out what’s doing what and finally with some luck modify and break things on my own. 

CakePHP Application Development briefly introduces MVC and CakePHP installation and takes you right to your first realistic web-app. By realistic I mean an application that actually involves and covers a good majority of the framework’s features. (There is no need to use a framework to output “Hello world”, which might’ve been a useful exercise in 1979, but certainly not today and not in this context).

The introduction to CakePHP concepts is gradual, but to the point. The explanations were clear and overall the book was a quick and easy read (which is good because I’m lazy and have a hard time with over-the-top technical reading). The “What just happened?” approach gives a perfect feel to leading by example. 

The progression of the book is pretty logical, but you have to make sure to really understand each chapter (and each part thereof) to be prepared to deal with the next, usually more complex topic.

A few gripes…

As mentioned I think the authors did a very good job of introducing the framework and a vast majority of the features. There are a few things that I wish would be improved (maybe in the next edition, if one is ever planned). 

No information about Behaviors. I feel that model behaviors deserve special attention, since they can become a very intrigual part of an application and business logic can often be handled very elegantly with behaviors.

No coverege of unit testing. I wish it would just be at least introduced or briefly touched upon. Granted, testing is somewhat outside the scope of the framework itself, but it’s a topic that must be brought up time and time again especially when it’s so readily available in CakePHP.

Too much time spent on AJAX. Sure, it’s important and no book on a modern web development framework would be completely web-2.0-ish without it, but I have a feeling that CakePHP will be abandoning its dependency on Prototype (JS framework). It gets things done, but it doesn’t always get things done the right way. 

Code formatting and spelling mistakes. Having to follow code is hard enough, but it’s even harder to follow it from the black and white pages of a book. Proper indentations and formatting are necessary (with logical bolding of some elements) and very crucial to a technical/coding book such as this one.  While in the beginning the code looks mostly nicely formatted, for some reason it seems to fall apart later on. There were also some misspellings, etc. (which, I guess, are good to discourage blind copying, but really should be addressed more carefully). 

Bottom line…

I definitely recommend this book as a first reading material for anyone who is just starting out with CakePHP. I simply see no way how one could be disappointed in the amount of information, its overall presentation and hopefully the ultimate result once the reader is finished and has tried out all of the examples. So to sum things up, on a scale from one to ten, it deserves a solid eight. Had it covered behaviors (with some solid examples), I’d probably give it a nine and I don’t think I can ever imagine a perfect technical book, so a 10 would be a helluva hard mark to reach :)

Related Posts

%d bloggers like this: