Sometime last year, I, along with quite a few others, was asked to review one of Packt Publishing's new books, Zend Framework 1.8 Web Application Development, written by Keith Pope. They sent me a copy, which was very good of them and although it's taken me ages to finish and get round to writing this review, that's not a true reflection of how good the book was, I'm just a very busy/lazy person! So lazy, that I did in fact say I'd have it done in two weeks, which turned into 4 months.
Packt asked if I'd be interested in reviewing the book, so watch this space, I'll be back in a couple of weeks with a review.
Introduction
Design, develop, and deploy feature-rich PHP web applications with this MVC framework
That is the books strap line, and it does exactly what it says on the tin. The bulk of the book actually takes you through the design, development, testing and deployment of a real world example application, called the Storefront. The book claims that it is written for PHP web developers that are either using or looking to start using the Zend Framework and that a basic knowledge of Object Oriented design would be helpful. While you might be able to manage without any OOD experience, I'd say you definitely need some to get the most out of this book, as the second chapter digs right under the hood of the Frameworks MVC architecture. My personal experience was that I got to learn all the things I haven't had time to learn, I've been using the Framework for a couple of years now, always appreciating, but not always understanding what it was doing for me.
MVC Architecture
The first chapter gives you a brief overview of creating an MVC application in the Zend Framework, experienced users of the Framework will probably want to gloss over this part, whereas people looking to start using the framework should take their time and take things in. The next chapter is when I really started to enjoy the book. Each component of the MVC architecture is presented as it's own topic, with each component getting a breakdown of Design Patterns/theory, default settings/configuration, usage and finally customisation.
The chapter is well put together and considering the amount of information portrayed, is not overwhelming.
Storefront Application
The rest of the book provides the information you need about the framework around a real world example application, called StoreFront, which is a basic e-commerce application. I should point out that I didn't code the application as I went, if I'm reading I like to read, but where appropriate I have used the book as a reference when updating my existing Zend Framework applications.
The best thing about these chapters though, is some of the design theory you pick up on the way, that isn't directly relevant to the Zend Framework, but can be applied to any framework out there. Best practices such as Fat Models, Composition, Fluent interfaces are all explained in detail, along with relevant and realistic examples. Further more, the applications MVC separation is excellent, taken in context (it might be a little overkill for the example application, but is there to show you the methods).
After taking you through the creation of the application, the book then takes you into optimisation and testing. The optimisation takes you though some general PHP optimisation techniques, but then ploughs into techniques like a transparent abstract cache that is applied to the models. Testing is carried out with the trusty PHPUnit, along with the frameworks extension of the library Zend_Test and the book goes on to integrate the test suites with apache ant (why not phing) and phpundercontrol.
Conclusion
In conclusion, I thought this book was an excellent read and I plan to follow it through again when I build my next ZF app (I have two good ideas in the pipeline). Find out more or and buy it!. Thanks to Packt for sending me a copy!