Book Review: Beginning CakePHP

Published on and tagged with book  cakephp

In this article I’m going to review the second (English) CakePHP book: Beginning CakePHP – From Novice to Professional (on Amazon) by David Golding.

The book consists of four parts: Getting Started, Developing CakePHP Applications, Advanced CakePHP, and Appendixes.

“Getting Started” is about installing CakePHP and creating a very simple (and scaffolded) todo list application.

The start of the second part, “Developing CakePHP Applications”, is a bit strange: it begins with the naming conventions of (almost) all CakePHP “elements” (i.e. models, views, controllers, etc.). It’s well written, but if you are a beginner you probably don’t want to know the naming conventions of something you don’t know yet. Then the book goes on with using models, views, and controllers. Also the bake script is introduced. This part ends with an introduction to CakePHP’s Ajax functionality (including a jQuery example). As example application, a blog is used in this and the next part.

The third part, “Advanced CakePHP”, covers everything else. Ok, I’m joking ;-) It starts with the built-in helpers: HtmlHelper and FormHelper are explained in detail, whereas for the other built-in helpers only a list of their methods is provided. Not that useful in my opinion, as you can find the same information in the online API documentation. Next follows a chapter about routes which also covers advanced stuff like magic variables. From the core components the following components are explained: Auth, Session, Cookie, and Email. Plus some utility classes like HttpSocket. An entire chapter is dedicated to “vendors”, it not only covers the App::import() functionality, but also how to use functionality from the Zend framework in CakePHP. This part ends with two chapters about plugins, and data sources and behaviors.

The appendixes cover installation issues and a comparison of CakePHP with other (PHP) frameworks. A third appendix, “Cake 1.2 Functions and Properties”, can be downloaded from the author’s site.

What I liked about the book is that it is well written and covers a lot of the functionality provided by CakePHP. And it surprised me with things I didn’t expect in a book for CakePHP beginners, like using functionality from the Zend framework, or the explanation of data sources. A nice add-on is that the author has set up a forum for questions related to the book.

What I didn’t like is that the example application, the blog, is put into the background, i.e. you don’t have the feeling like you are building an application. Sometimes the blog application is used for the examples, sometimes not.

It’s not the author’s fault, but some things are already outdated (the book uses the beta version resp. RC 1 of CakePHP 1.2).

Anyway, this book is a good introduction to CakePHP and provides a good foundation, but you have to be aware that it doesn’t make you a professional as promised in the book title. For that you have to program, program, program ;-)

6 comments baked

© daniel hofstetter. Licensed under a Creative Commons License