Zend Framework 1.8 Web Application Development

Zend Framework Web Application DevelopmentThis is another long story short book review. I have to mention this, the book is not outdated! I know that currently there is the version of 1.9 in ZF and the title of this book is “1.8”. Do not let the title mislead you. This book is all about Zend Framework’s actual concepts like MVC, Zend_Application and other kind of ZF jewels. If you are new to the Zend Framework and need a more detailed documentation than the Zend Framework’s Quick Start Guide or my blog, that’s the book you will need.

The book is just like “Magento Beginner’s Guide“. It starts from the installation and goes till you create a fully working production ready web site. I love this kind of approach in a book because you get a hands-on experience. Reading a book is always cool. However you have to use a framework or a programming language for you to understand what the book is talking about.

Book starts with the most problematic part of the Zend Framework, creating a project from scratch. Until 1.8 it was a great problem because you had to create lots of files and folders and you were generally forgetting what you had to create. Zend_Tool is solving this problem. As you know we now have a “zf” command which will create everything you will need to initialize a project. Another problem is generally to find out how to write the “bootstrapper” and application config file (an ini file mostly). Book explain them as much as it can.

On the general, Zend_Tool is used and this will help you get used to using it instead of creating your own files and folders. First Chapter is really about the basics of MVC and Zend Framework. However I honestly suggest that you should at least take a look to it. There can be some little tips which you had known before. (I hadn’t know assign() for example:)

Second Chapters details the thing about Zend Framework‘s MVC. What methods are called, what it the call stack and order. Things get a little advanced from this chapter. Which is good because this book might also help people who has an initial understanding of ZF however they lack the knowledge of everything. As you know ZF is huge framework and while using it, you just use or do something, without knowing that you can do it with a ZF component with one line or something. Second chapter might help you with this. If you are new to the ZF, second chapter might be a bit hard for you but as the author says, “it’s worth it”.

From third chapter to the tenth, you will create a real application. It’s great that, third chapter gets into the details of Zend_Config and and application config ini file which most of the people seems to be missing. One thing you might find interesting is that author is using “ant” to “build” his source code. Another beautiful thing is the mention of FirePHP logging. Which I had mentioned in one of my blog posts! (You should really use it, it really helps you a lot.)

Fourth chapter is about models in ZF. It does not tell you to use Doctrine but it helps you to get the idea of “Fat Model, Skinny Controller”. Which tells you to keep your controllers short (do not write sql queries or Zend_Db equivalents in controllers!!) and put things related to the data in models. The book gives a long reading about models and different approaches in software development, it’s a good reading, however it might get boring, just use Doctrine and be done with it :)

Eighth chapter is interesting because it talks about Zend_Auth and Zend_Acl for login and authorization and authentication like I had mentioned them in another one of my posts :) However the book get into the implementation and concept details. How to relate them with models etc. That’s a really good read and if you don’t get lost in it, it will give you quite an idea how to do something.

Chapter 11 will talk about caching. This will give you a good understanding on Zend_Cache. What is the Backend and Frontend distinction in the Zend_Cache, or what is Memcached, etc,…

There is even a chapter for your tests! That’s pretty cool too even if you know how to write unit tests (which most people still don’t or don’t care) or what is phpunit, you generally don’t know how you can test your controllers or your models. The book gets into the details of this and integration options with Zend_Test.

For the last words, I really suggest this book to people who are not a total beginner but someone who knows a little what is Zend Framework. Even if you are a beginner you will get a lot of things with this book. However you might get lost in the concept too. This book is more about “how to do things write with Zend Framework” and less about code examples. This is a book for people who knows what is Zend Framework and want to learn more about the “best approaches”. Do not get mislead with the version number in the title of the book. Things told in this book are mostly valid in version 1.9 too.