Book Review: CakePHP Application Development

The folks at Packt Publishing were kind enough to send me a copy of their newly published book CakePHP Application Development to review. The book is authored by Ahsanul Bari and Anupom Syam, and is a quick read at 300 pages. CakePHP Application Development is aimed at developers who know PHP but want to learn how CakePHP can help them work faster, and smarter. The book teaches the reader how to use the still cooking 1.2 version of CakePHP. The book aims to provide an introduction to CakePHP and does so quite well.

The book starts off by introducing the reader to CakePHP and MVC principles. It goes on to cover how CakePHP handles requests, why you should be using a framework, and the benefits of using a framework. The authors then dive into making a simple to-do application. This gets the readers feet wet quick, and introduces the user to a number of concepts without getting mired in too many technical details. The remainder of the book revisits each of the MVC blocks providing a more detailed and thorough explanation of each. All of the chapters act as a lead up to building ‘QuickWall’ a question and answer application that uses many of the built-in components and helpers.

Where it hits the mark

The book is well structured and takes the pragmatic approach of getting things done and then explaining how it works. Each chapter is broken down into a number of ‘Time for Action’ and ‘What Just Happened’ sections. These sections respectively are about doing, and learning. I enjoyed this structure, and found that it kept the code and words separate, allowing the reader to focus on one thing at a time.

The book covers a lot of ground very quickly, going over how controllers, views, models, relationships, helpers and components work and what their role is in a CakePHP application. One obvious omission is behaviors. There is no mention of them at all in the book, and I feel they are a powerful building block especially the Containable behavior. The other CakePHP ingredients were covered with enough detail to introduce the reader to them, and get what was needed done. Certain helpers and components could easily take up an entire chapter themselves, but I’m glad the authors didn’t. Going down that road could quickly shift the book away from its getting things done approach, and bog down the reader explaining each of the FormHelper or AuthComponent methods.

Where it missed

Although the book is an excellent resource for the beginning baker, there are a few things that detract from the experience. The book is littered with grammatical, and spelling errors. These grammatical and spelling issues spill into the code as well, creating a frustrating experience for a reader who is unable to get his/her ‘minlenght’ validation to work. I also found the formatting of the code sections to be a bit lacking. It is inconsistent and there are a few places where it is just plain hard to read.

I would have liked to seen a bit of space dedicated to some of the utility libraries like the Set and Sanitize classes. Although not critical to building basic applications, they can help simplify some everyday processes.

CakePHP 1.2 has been a moving target for quite a while, and although most of the dust has settled, the book was written against the beta. Since the beta was released there have been a few important changes. The most visible, and likely to effect the reader of these is the shift of SQL operators to the key side of conditions arrays.

So is it any good?

Yes, even though the book has some blemishes I would still recommend it to anyone thinking of learning CakePHP. It is an excellent primer to the framework and will help you get your ‘sea legs’. The book gives good practical examples and explains them well. With that said, if you are already familiar with CakePHP it is unlikely that this book holds any hidden treasures.


Thank you for the review. I’ve just ordered it and also 2 others related books “From Novice to Professional” and “Practical CakePHP Projects” will if I can get deeper into Cake :)

anonymous user on 10/13/08

This books is great for beginners, i used it, it explains each and every actions with examples.

But unfortunately some advanced features are not included, for example components , there is a small introduction about components there is no working example…..

anonymous user on 10/26/08

Yeah I agree that this is a great book for beginners as this book was my jumping off point for cake. I’ve really learned a lot and actually enjoyed some of the errors/depreciated stuff since the book has come out as it then challenges you to fix it :)

anonymous user on 10/28/08

Be not indignant that you cannot create others as you wish them to be, since you cannot prevail upon yourself as you hope to be

Step Machine on 9/21/10

Comments are not open at this time.