Zend Framework – Ready or not?

We are a fairly large PHP shop at work running some of the largest Danish websites. In a fairly new project, it was suggested that we considered using the Zend Framework to fast track development and piggy back upon some of the components provided by the framework. We looked at it, and said no – at least for now.

Since the Zend Framework website does an excellent sales pitch on why you should use it, here’s some of the arguments why you should restrain from using the framework.

The first argument is maturity. The latest version (at writing time) is 0.6.0. The Zend Framework was announced in October 2005. It’s a large (and growing) collection of code. As it hasn’t reached version 1.0 – even the website calls it a ”preview release” and first we need to see that happen (their roadmap look assuring) – and see it go beyond. To use the Zend Framework for professional websites, there must be at least some sort of track record to build confidence upon – and the framework hasn’t come to that point (yet) in my mind.

The framework is supposed to be released as one huge framework – not ”components” (as it happens with PEAR). You install all or nothing. It’s a design choice, and I can understand why it has been made, but it also makes it at much larger issue, if you want to upgrade – each and every part of you website utilizing a piece of the framework, must be tested every time you upgrade.

Sure a comprehensive collection of unit tests and automated testing tools may lower the risks – but do you have a complete test suite and are you sure it covers everything? – I’m certainly not in such a position, and like upgrading components ”step by step” thank you.

If the project was mature, if there was track record, if the change logs had all needed details, I might change my mind, but currently, there just too many ifs.

The third case against the Zend Framework is the more profound question – do you really need, want and benefit from a framework like this. The main argument for using frameworks is that you can save (a lot of) developer hours by using a framework. Right. If your a small business, you probably can make that argument. What if you’re huge heavy-traffic website? – is developer hours still the main concern? Probably not.

By their very nature, frameworks often adds an extra layer to your application, which takes time of the webserver/PHP engine to process – just try a simple profiling of your code – if you haven’t got access to a PHP profiler, then just try making a script with a loop that connects to a database, writes a random record, reads the record and disconnects – the difference ought to be obvious.

Assuming we’re using a ”lean framework” I’m guessing it probably adds 15-20% extra processing time to your scripts. With a page being access thousands and thousands of times a day – the few extra milliseconds of processing time becomes hours and that could quickly means extra servers to carry the daily load. Saving an extra hour here and there is probably not worth it, if it costs and extra server here and there.
The last of my main issues with frameworks (or abstraction layers) is that they often provide a freedom you don’t need, and at a cost, you can’t afford. Database abstraction layers provide you with an option to choose between Oracle, DB2 and Mysql, but what if your hosting provider only provides (or your DBA doesn’t know anything but) Mysql? Often the flexibility provided by the abstraction layer – to choose between different services, libraries, databases or something completely different, is only important for software vendors, not a custom developed solution – there the (technology) design choices doesn’t change on the short term.

The cost of the flexibility provided by the abstraction layers is that you must stick to the lowest common denominator in your solutions – you can’t use any mysql-specific SQL – if you do, most of the reasons for using the framework is lost and just extra crust to you application.

Don’t get me completely wrong. I’m not against the Zend Framework. I do think it is interesting and may find a place in the world. Currently, however, I do think it’s better suited for sandboxes than for the real world. Once the project has mature more, has a proven track record and it provides significant gains at a reasonable cost, I may change my mind. Just maybe.

  • You should take a look at the framework now, it has matured very much, and is now at version 1.0.2. It is still under very active development, and so you may still not want to use it for demanding applications, but I would invite you to take a serious look at the framework and examine its capabilities by actually trying it.

    I noticed in your post you gave a lot of guesstimates and percentages about processing time and whatnot.

    ZF _is_ a lean framework, you do not have to install the whole thing as you say in the article. You don’t have to use the MVC components at all, you are free to use whatever part of it you need, it is the most loosly coupled framework I have seen.

    Yes, there is a lot of code, it is a very nice library of tools if you need them, I find myself removing code that I don’t use when it comes time to launch the site.

    Frameworks not only offer time savings, but improve the quality of the product. How many times do we get lazy, and not validate a form input as we should(for example), a framework simplifies this process and encourages(and often enforces) best practices.

    It sounds like you do not like to use frameworks in general, this seems like you have some angst against projects like RoR, CakePHP, Symfony, and others as well.

    Try the frameworks before you knock them. Visiting a website and reading about it does not give you a credible opinion.

    If you’re worried about performance, you can write all your websites in C++ and get blazing performance. 🙂

  • You should take a look at the framework now, it has matured very much, and is now at version 1.0.2. It is still under very active development, and so you may still not want to use it for demanding applications, but I would invite you to take a serious look at the framework and examine its capabilities by actually trying it.

    I noticed in your post you gave a lot of guesstimates and percentages about processing time and whatnot.

    ZF _is_ a lean framework, you do not have to install the whole thing as you say in the article. You don’t have to use the MVC components at all, you are free to use whatever part of it you need, it is the most loosly coupled framework I have seen.

    Yes, there is a lot of code, it is a very nice library of tools if you need them, I find myself removing code that I don’t use when it comes time to launch the site.

    Frameworks not only offer time savings, but improve the quality of the product. How many times do we get lazy, and not validate a form input as we should(for example), a framework simplifies this process and encourages(and often enforces) best practices.

    It sounds like you do not like to use frameworks in general, this seems like you have some angst against projects like RoR, CakePHP, Symfony, and others as well.

    Try the frameworks before you knock them. Visiting a website and reading about it does not give you a credible opinion.

    If you’re worried about performance, you can write all your websites in C++ and get blazing performance. 🙂

  • You should take a look at the framework now, it has matured very much, and is now at version 1.0.2. It is still under very active development, and so you may still not want to use it for demanding applications, but I would invite you to take a serious look at the framework and examine its capabilities by actually trying it.

    I noticed in your post you gave a lot of guesstimates and percentages about processing time and whatnot.

    ZF _is_ a lean framework, you do not have to install the whole thing as you say in the article. You don’t have to use the MVC components at all, you are free to use whatever part of it you need, it is the most loosly coupled framework I have seen.

    Yes, there is a lot of code, it is a very nice library of tools if you need them, I find myself removing code that I don’t use when it comes time to launch the site.

    Frameworks not only offer time savings, but improve the quality of the product. How many times do we get lazy, and not validate a form input as we should(for example), a framework simplifies this process and encourages(and often enforces) best practices.

    It sounds like you do not like to use frameworks in general, this seems like you have some angst against projects like RoR, CakePHP, Symfony, and others as well.

    Try the frameworks before you knock them. Visiting a website and reading about it does not give you a credible opinion.

    If you’re worried about performance, you can write all your websites in C++ and get blazing performance. 🙂