Instant CakePHP Starter Book Review
The latest CakePHP book from Packt is a short and sweet number called Instant CakePHP Starter and although it's quite short it's very cheap. I was asked to review the book by Packt so here are my thoughts.
The book provides quite a good introduction to CakePHP and getting it setup, it also explains howto use AppFog with CakePHP and getting everything setup with a database which is quite good for getting things live. I've never used AppFog personally however it looks relatively straight forward although there are some command line setup steps which could prove troublesome for first timers.
Next up is a section on the Bake command which is great for getting an app setup quickly, it uses a very simple example with a few Models which is good for getting to grips with the code and how everything works and fits together. I learnt a few bits and pieces here especially around schema's, the command line api docs and the process of internalization. Definitely worth a look here if you're lacking knowledge in the bake command.
After baking the book moves onto Routing and the structure of Controllers and Views, some good points for new developers looking into MVC frameworks and how it works from a CakePHP standpoint. There's a quick review of how Views work and how they're wrapped in Layouts and finally goes onto talk about Themes and provides a sample theme to get Bootstrap up and running for the sample application. I've not used a theme before so I managed to learn something new here.
With Views and the application the book goes onto integrating nice URLs in the form of slugs which is definitely a real world example of logic which an app developer will need. It goes through the process of using the Sluggable behaviour and getting it setup throughout the Controllers, Models and Views which is very handy. Pages are then briefly touched on and how to go about creating new standalone pages such as an "About Us" page which is also useful.
The penultimate section extremely briefly touches on Testing, installing PHPUnit and generating Fixtures & Test via the bake command. As the section is so short and doesn't provide any real world examples I don't think it's a good idea to include it in a starters book. Whole books can be written on Testing alone and would of prefered the book to expand on other areas such as Model associations in respect to the sample application.
Finally the book provides a few useful places where you can go to get help and learn more, basic stuff which can be found in the offical docs but worthwhile to compile at the end of an introduction book.
Overall I think the book is worthwhile for beginners considering the price, as it's an "instant" book the chapters are short and gets you up and running quickly. The downside is that because it's a starter book you could get to a similar level by going through the official docs; they do get some grief for not being upto scratch but personally I think they're very good.
I did learn some things with the book and I think it covers a lot of ground with some relatively advanced topics very quickly (the bake tool albeit being powerful does require some command line knowledge which may be lacking for extremely new developers), as mentioned I would of left out the Testing section in a book such as this. It's great to get developers aware of testing and how it's done in CakePHP but again for new developers the learning curve is already quite steep.
If you're new to CakePHP and want a quick introduction with examples on howto get a simple app up and running I would recommend the book especially for the price. It can fill some knowledge holes and good to get a different perspective & voice on howto do things in a well written manner.
Posted on 18th July 2013
3 years, 10 months, 1 week ago