donderdag 22 januari 2009

Review: CakePHP Application Development

Well, here I am, trying to write my first book review ever. It don't think it will be the best review ever, so please don't review my review... Anyway, I read a copy of CakePHP Application Development published by Packt Publishing and will post my thoughts below.

The book is divided into a few parts. In the first part, an introduction to CakePHP is given, followed by a little example application, CakeTooDoo. After that, a more in-depth explanation is given about Models, Controllers and Views. Then, you're taken to the shell and do some baking before the last part, which is about building an example application called Quickwall.

Introduction
The introduction explains What CakePHP is and describes the advantages of using a framework like CakePHP. Also, the MVC Pattern is explained and you are introduced to the most commonly used functionalities of CakePHP, like validation. Next, you are going to download and install CakePHP. Of course, you need Apache and Mysql installed on your machine. You could use something like WAMP or XAMPP if you haven't already got those installed.

CakeTooDoo
After the introduction, you will setup a simple to-do-list-application. During this, you will get a little view of how CakePHP works. Some basic Models, Controllers and Views are created. The authors call this part a quick rollercoaster ride through the important aspects of CakePHP. And that's correct, you get to know some important stuff about it.

Models, Controllers and Views and the shell
....Why is everyone talking about MVC while we start with the Model and end up with the View? Am I missing something?

Ok, back on topic... In chapters 4-8, you get a more in-depth look at Models, Controllers and Views. It is explained how CakePHP interacts with your database through models, how models are related or can be related to each other, how to manipulate data, write controllers and create an interface for your end users through layouts and views.

When you understand how Models, Views and Controllers work, you wil be introduced to the Shell in the next chapter. The shell will give you the ability to kickstart your development or quickly create prototypes of your application. This chapter is a very short course to let you bake a cake.

Quickwall
So, you have learnt some things... I guess, and you are ready to bake a cake. The next cake is called Quickwall, an application where you can submit any question and get those questions answered. Hey, can anybody answer my question about MVC? Quickwall will not only let you bake a Cake, but also put some nice Dr. Oetker stuff on it like validation, ajax and disco-dip.

If you have a little bit experience in using CakePHP, these chapters will be the most interesting, as this is a real world example with authentication, ajax, rss and pagination.

CakePHP Application Development Book Image
Conclusion:
CakePHP Application Development starts at the very basics of CakePHP. Probably this book works best for developers who are already using PHP, but who are interested in CakePHP. If you develop your stuff the old way and you want to DRY things up, try CakePHP. For those developers, this book can be an interesting start. Especially after the introduction and explanation of MVC, when you are building the Quickwall application.

I like the way it is build up, you create some stuff, and after that, in the "What has happened?" parts, they explain ehm... what has happened. That's pretty clear.

For developers who already have experience in CakePHP and now how to do stuff like rss and pagination, this probably isn't the right choice. Does anyone no of good CakePHP books at another level, for the more experienced bakers?

If you want to start developing with CakePHP and want to buy a book to read and to try some sample applications, CakePHP Application Development might be a good choice for you.