Book Review: CakePHP Application Development
After completely exhausting their list of every CakePHP blog, Packt Publishing, broke down and sent me a free copy of CakePHP Application Development to review. I was really tempted to write a joke review, where I focus on the binding and typeface (both superb by the way) and show pics of me using the book around the house. Like a shot of my daughter using it as a step stool to get on the toilet or me squashing one of those giant alien bugs that occasionally sneak into my basement with it. Then when they sent me a nasty email, I would play dumb and be like "Oh...you wanted me to review the CONTENT of the book."
But then I realized:
a) That would greatly reduce my chance of ever getting free shit again.
b) This may be my one shot to get quoted on a book jacket (assuming they do a second edition). So throughout this review, as a favor to the publisher, I will be highlighting jacket worthy quotes.
"The binding and typeface are superb." -Matt Curry, PseudoCoder.com
The Boring Part (of this review - not the book)
Now I know how guy #497 of the Houston 500 (link NSFW) felt. There isn't much new to cover, as it has all been said before. I will say the grammar didn't bother me, like it did most of the other reviewers, probably because my mind operates at a 3rd grade level.
The other common complaints: not enough depth (no behaviors or unit testing), poor formatting off the example code and it's based on early 1.2 version of CakePHP, so there are inconsistencies with the final release.
"There a lot of complaints about the grammar and punctuation, and I mean a lot, but this doesn't detract from the overall value of the book." -Matt Curry, PseudoCoder.com
In The Beginning
The first part of the book deals with getting CakePHP setup and starting a simple todo app. If you have even a modest amount of CakePHP experience you can skip the first third of the book or so. I will give the authors credit for not walking the user through setting up a web server and database. Although that credit is immediately taken away when they devote three pages and four screen shots to downloading Cake. I think if I were learning Cake for the first time this section would provide some value. There are decent code examples that are immediately re-enforced with a description. At times it feels a little much, as if the authors don't give enough respect to the reader's intelligence.
"Even if you're slow in the head this book is for you!" -Matt Curry, PseudoCoder.com
Much of the same materiel is covered in the example blog application in the CakePHP manual. The blog app doesn't have as much discussion as the todo app, but depending on your learning style this may be better. The code, to someone who is familiar with PHP at least, is fairly self explanatory for these types of beginner apps, so having a section of text, just as long as the code, really isn't necessary. It's like when you see a comment "//increment $i" and the next line is "$i ++". Really the comment isn't necessary. There are many good parts to the authors explanations, but at times these points can get lost in the filler text.
The Middle
You know the programming books that you always have near by - the ones that are a deep and valuable reference? CakePHP Application Development isn't like that. This becomes clear in the second major app built in the book: a book catalog system. In this part of the book two of the more important concepts are introduced: validation and model relationships. Take the validation section for example. It does a nice job of describing the format of the validation array, the various keys and one basic custom validation routine. But if you want to know more about a particular validation rule or even a full list of the rules it directs you towards book.cakephp.org. If you buy the book thinking of it as an extended tutorial you won't be disappointed. If you're looking for a handy reference stick with the online manual.
"The $39.99 price tag may seem a bit high, but once you factor in that you'll never need the book after reading it and can re-sell it on eBay it becomes a bargain." -Matt Curry, PseudoCoder.com
The End
The last app made in the book is called "Quickwall" and is a questions/answers app. This app brings together all the pieces you've learned so far and then goes over some of the splashier extras, like AJAX, RSS, and Pagination. I think the RSS section is a good example of one of my issues with the book. Many of the concepts explained in the book teach the reader how to do something within the example app, rather then teaching the user about the feature in general so that they can apply it to any app. The "What Just Happened" sections that follow most of the code examples tries to remedy that, but some of the value is lost by having long block of code followed by long blocks of text, rather then intermingling the two.
Random Rant
I think my biggest gripe with CakePHP is the name. Well, not the name itself, but the fact that the name leads to excessively trite cooking analogies. This book is no exception. Some examples:
- "The ingredients are fresh, sliced up, and in place. The oven is switched on, heated and burning red. It is time for us to put on the cooking had, and start making some delicious cake recipes."
- "...and making a quality application with CakePHP is as easy as easting a cake."
- "Keep reading, and you will become an expert baker in no time!"
- "Scaffolding is great for quick templates, but eventually you're going to have to add your own secret ingredients. Like the human flesh I use in my decadent chocolate fudge cake."
Fine, I made that last one up. But you get the point. I assume all the other framework have this same issue. symfony coders are probably called "conductors" and programming is probably called "composing". Code Igniters probably go by "arsonists" and coding is "burning that fucker down."
Not That Bad
In general I don't think the book is that bad. I remember some very frustrating days when I was first learning CakePHP and having this book then probably would have helped me out. As someone first learning CakePHP I'd probably check out the online/free blog tutorial first and if I felt I needed a more in depth tutorial I'd get this book.
"Not that bad." -Matt Curry, PseudoCoder.com

6 Comments
The best part are your "quotes".
Now you owe it to us to recommend books you DO like.
I would love to see a book more geared toward intermediate/advanced users that know the basics but need to optimize.
Once you've been using CakePHP for a while, you start looking for "slicker" ways of doing things. For example trying to have the skinniest controller and fattest model in history (Or at least some techniques). Or a solid alternative to requestAction that doesn't seem iffy. Or rock solid caching techniques. The list goes on. I would like to see that sort of book come out in the near future. It would certainly find its way onto my bookshelf.
Btw, good article. The quotes were pretty funny :D
Agreed. That would make a great book. I actually started doing a series of "advanced" CakePHP tutorials a year ago. I had planned to eventually roll the whole series into an e-book. I got through like two posts before getting distracted...
Many thanks.
Add new comment