Book Review : Zend Framework in Action
I signed up for the Manning early access program for Zend Framework in Action to get information on the ACL functionality in the framework and the book provided some useful examples. I was a bit underwhelmed by the content in the first release, but I guess that is to be expected when viewing a rough cut.
This release (the 2nd) is a vast improvement, and the book is really starting to come together. I like how the authors go into detail about testing, showing not only how to test your models, but also how to test controllers, and showing some common set up steps. It doesn’t cover all the details of testing, nor should it, but the book provides a solid background to build upon. This is refreshing compared to most books which simply mention testing and say whole books have been written about it.
The book does a good job of logically building upon previous examples, and I felt the flow was good when introducing more complex topics like Plugins and ActionHelpers. This version was updated to include Zend_Layout, including info on partials and ActionStack plugin, but the chapter on forms is not complete yet – looking forward to reading that when it comes out.
I thought the AJAX chapter was a little shaky. Maybe it’s me, but I felt the authors spent too much time going over a general ajax request sans the framework. By the time they work the framework into the equation, they are using an include file in a controller action to bring in some procedural code written earlier. And that procedural code lives in the models folder – it just doesn’t seem right to me. I think this would have been a good opportunity to use Zend_Filter, although it is used in later in the book when discussing Zend_Search_Lucene (the chapter on this is very thorough and easy to understand). Also, they recommend using separate controllers/actions for Ajax requests and not rendering the view in each action method. That’s fine, but I would also like to have seen using a Plugin in the dispatch loop to detect an Ajax request and automatically turn off Zend_View/Zend_Layout.
I like how the authors occasionally work in design patters, such as the registry, and the observer pattern in the search chapter. The authors describe using the observer pattern with hooks in the DB class (hooks which I didn’t know existed) to update the search index.
The chapter on deployment was good; most books don’t seem to tackle this. My only quibble is when discussing setting up virtual hosts, they say to make sure to enable AllowOverride to use .htaccess. I don’t have any problem with this, but since the book is talking about Virtual Hosts, they should recommend putting the redirects in the httpd.conf file, rather than relying on .htaccess, as it is more efficient due to the fact that Apache doesn’t need to read a file on every request.
At times I felt like there may be too much ancillary topics covered, however, after finishing the book, I felt overall it was good that topics such as testing, deployment, and version control were covered. While there isn’t enough information to provide in depth coverage, it exposures the reader to these topics and provides enough information to get started, rather than just briefly mentioning it. And the coverage of the different components with the Zend Framework is comprehensive and understandable. If you are looking at working with the Zend Framework, I would definitely recommend this book.
April 11th, 2008 at 2:55 am
Thanks for the thoughts!
The Ajax chapter is showing it’s age a bit now though as it was written well before Zend Framework 1.5 when the new context switch and other Ajax goodies were introduced.
Regards,
Rob…
April 11th, 2008 at 2:56 am
[…] Robert Bolton has posted a book review of Zend Framework in Action: At times I felt like there may be too much ancillary topics covered, however, after finishing the book, I felt overall it was good that topics such as testing, deployment, and version control were covered. While there isn’t enough information to provide in depth coverage, it exposures the reader to these topics and provides enough information to get started, rather than just briefly mentioning it. And the coverage of the different components with the Zend Framework is comprehensive and understandable. If you are looking at working with the Zend Framework, I would definitely recommend this book. […]