I’m spending this holiday season trying to plow through some of the books that have been stacking up lately. There are just too many good books out there. Today’s book is by Vikram Viswani, a name regular readers will recognize instantly. Vikram has been a long-time contributor to DevZone and is the author of our most popular article series, Zend Framework, A Beginner’s Guide
For those curious, the book weighs in at 411 pages plus appendix. If you buy your computer books by weight and not by content, it’s not a great value. However, if you are looking for solid Zend Framework content in a very readable format, this is a good book. Vikram carries the writing style of his articles with him in this book. The language is easy to read, the examples are clear and there’s even a joke or two in there that will make you groan. In short, I would recommend this book to any PHP developer with a firm grasp on object oriented programming in PHP. If you are not comfortable with OOP, this is not the book for you.
Let’s start with what I didn’t like about this book and get that out of the way. This book jumps around a bit. Several times, new concepts or components are introduced without explanation only to find that they are fully explained later on in the book. I tried to look at the contents form the point of view of someone new to Zend Framework. Each time a new component was introduced, I looked back to see if it had been discussed and explained before. In most cases they were but in a few very important cases, they were not. Since the target audience of this book is a developer with past experience, I don’t think there are any situations where this becomes a show stopper, but it may cause you to stop, re-read and go Google to figure out what is going on before moving on to the next section.
Second, Vikram and I disagree on how Models should be built. He spends a good deal of the book talking about integrating Doctrine and Zend Framework and using this integration to build your models. While I have no problem with Doctrine (I have friends on that project and respect it for what it is) I don’t like coupling Models to any specific persistent data store like a RDMS.
Third, as a programmer, I see the need for configuration files and Zend Framework makes good use of them. However, in many cases, there are two ways of doing something, by code or by config file. As a programmer, I would prefer to be taught the code way and then have the config file way explained to me once I understand what is going on. in several cases, most notably when discussing routes, Vikram relies on the config file instead of showing me the way of implementing them in code. Eventually, he does show an example of a route built in code and the proper place in the Bootstrap to do it but it is well into the book and it is almost an afterthought.
I’ve already mentioned the writing style but let me reiterate it here. Vikram is a polished writer and a great programmer. It’s easy to find one or the other but when you put the two together, the experience of reading the book is so much more enjoyable. Vikram’s style and pacing make this an easy book to follow, whether you are consuming it over a weekend or a month. The content is, for the most part, logically organized and the topics that are covered are covered in great depth. Chapter 3, Working with Forms, is almost worth the price of the book alone. Zend_Form is an ugly hairy beast with lots of warts. Vikram does an excellent job of explaining not only the basic uses but showing you example code how to really make it shine.
The code examples are complete, almost to a fault. Many publishers don’t like it when an author fills a book with code examples, they consider it padding. Thankfully, McGraw/Hill does not and they allowed Vikram to put as many as he needed in there to drive home a point. The code examples are clear, obviously necessary and very easy to follow.
The book is complete. Having been working with Zend Framework since version 0.2, having taught classes on it and having written a book on it myself, I can say that I am familiar with most of its pieces. In looking at the table of contents, there are very few topics that I did not see in this book that I would consider beginner topics. It is not a complete guide to Zend Framework but it is an excellent beginner’s guide. (Which is really all it promises)
Wrapping it up
I get a lot of books sent to me for review. Most of them have enough in them that I don’t like so that I don’t review them. So when I do take the time to review one, it is because I saw merit in the book. I see merit in Vikram’s book. As I said in the opening, I would recommend this to any PHP developer who understands OOP and wants to learn Zend Framework. If you like it, make sure you drop him a note over on his website, melonfire.com and tell him so.