As you might have noticed I mostly write about Zend Framework and related content. This has a lot of underlying reasons, so I decided to wrap up my thoughts about it and why to (not)use Zend Framework for your own projects. This is not a comparison of frameworks though, because I don’t feel like having enough experiences with other frameworks to make a fare comparison, that’s why this is going to be only a Zend Framework analysis.
History
First time I have actually built an application with Zend Framework was about a half year ago, if I remember correctly version 1.8 was already around. Although my first applications were more than two years ago, but hey were more than tests and playing with at that time new features. So as I said above, not that long ago I switched most of my company’s code to use Zend Framework, contributed some code and have also started working as Zend Framework consultant (drop me an email if interested), so I think I have a pretty decent experience to judge it.
Before diving in to the analysis, I would like to clarify, that the reasons why I’m not using other frameworks are mainly caused by the fact that I didn’t had a chance to do that. Since I’m usually working with projects lasting more than 3 months, I need to be confident enough to know that after 2 months I don’t need to throw everything away and start from scratch. Also to test a framework for me is not to create a Hello World application, I need to build something serious to know what features are missing and what problems can be a big issue. Nevertheless, I’m planning to do some research sometime.
Advantages
For me the most important piece of software: how customizable it is. As you might have noticed from the posts like this, I usually work with complex web application and would like to have ability to built it from ground up. Zend Framework was perfect for this, because everything is just a collection of building blocks, literally (or loosely coupled in proper terms). I really liked that there is no default or even worse required structure and everything can be configured very easily.
Because I’m also in a position responsible for a whole project, quality for me is very important. I don’t know how other frameworks handle this, but Zend is pretty serious with what’s in framework and how the code is maintained. Starting from requirement to sign Contributor License agreement (known as CLA) and requirement of 80% unit-tests coverage, ending with bug hunt days. Somehow it helps me to have a confidence to rely on the framework, and backwards compatibility has never been an issue (it’s surprisingly good).
Variety of components and libraries makes development faster because I do not need to search for another library (there is also coding standards problem and a lot of smaller libraries are just a bunch of files, without any clear structure). As of today, I probably have used more than 90% of available components and because they tend to share the same configuration style or just work style, it didn’t took long to start using them. For example, just last night I converted whole application to use custom routes (one custom route per action) in about 4 hours, without having done it before at all.
Community is number one best thing of Zend Framework. Apart from contributors, there are thousands of people willing to help and share their knowledge. Usually I hangout in twitter (here), but there are also IRC channels, mailing lists, forums and many more. I’m subscribed to hundreds of PHP blogs and from what I can see, Zend Framework articles are most common and usually in a very good quality. For me web applications development is not just writing code, so having a wonderful community really helps.
Disadvantages
Hard to learn. This is not a problem (any more) for me, but can be tricky when working with others, especially with things like form decorators. Even though Zend Framework has a very good documentation, I would say, that used techniques are sometimes not straightforward for starters and can lead to a very bad code. As with example with form decorators, once you get them, work with forms will be a joy, however at first they seem as pointless complication. I guess the best thing is just read the manual properly (RTFM in more rude words) – you will benefit later.
For some an issue can be that Zend Framework has no scaffolding. In short, scaffolding is a user interface and logic generation based on database description and business logic definitions. If you have used frameworks like Django (my favorite for Python, has perfect scaffolding), you will miss these things and it can be a first “brick wall” for your learning. Zend Framework has Zend_Tool component which provides basic project generation (you can customize it easily), but this is pretty much everything.
Connected to the both issues outlined above, Zend Framework in general is sometimes too much loosely coupled. Because all the components are just separate classes and out of the box you don’t get any sort of web application, one might have problems trying to understand what to do with all this stuff at all. It’s a great feature for me, but for someone not having any experience with Zend Framework it is probably impossible to build application without a help of blogs, books or (my recommendation) manual.
As you might have guessed, the fact that Zend Framework has lots of components also means that there should be enough developers to support them. However, this is not always the case and some components are really lacking new features or updates. For example Zend_Pdf is quite out-dated and not moving as fast as a lot of us would like to. But hey, it’s an open-source framework, so if you have ideas of how to improve things – you are free to do, believe me, it’s a great fun to contribute to such a influential software application. Nevertheless, always evaluate available components and choose what’s best for your project.
There is also the funny part – misconceptions and myths. I’ve just started working on a new article about these, so expect some interesting things very soon.
Conclusion
I hope it’s clear, that most of the advantages and disadvantages are coming from the same root – depending on what experience you have and what you are looking for Zend Framework can be a good or absolutely awful choice. For me it’s a perfect tool and currently I have no plans (even though Symfony is in my todo list) to use something else, and if you look at things which are coming in version 2.0 of both Doctrine and Zend Framework (yes, they will have integration)… Simply a good solution for serious work.







