Spiga

Zend Framework, A First Look

March 14, 08 by Andrew Vayanis

Having used Code Igniter for some small projects at work, I recently decided to take the time to acquaint myself with the Zend Framework(ZF) so that I could build my own comparison between two of the most, in my opinion, developed and used PHP frameworks. While I love the flexibility and functionality offered by ZF, I have become very frustrated and annoyed with some of their documentation. Even though it is detailed and expansive, it is no where near complete and somewhat frustrating to use.

Zend_Form is a great example of this incomplete documentation. Conceptually, I think the Zend_Form is great. It offers very useful, and much needed functionality for creating and validating forms within pages and although it offers 4 pages of documentation and highlights many features, it barely touches upon one of its most useful features: the ability to create a form by passing the constructor a Zend_Config_Ini object. In its simplest form this amounts to the following:

$loginForm = new Zend_Form(new Zend_Config_Ini('/path/to/form/config', 'login'));

This will create a Zend_Form object by passing it a Zend_Config_Ini object.

Unfortunately, when you decide to build a custom form using Zend_Config, the documentation on how this actually works, is extremely sparse. There are three examples of using the Zend_Config, however, they are not commented and there is no explanation as to how it works, there is only a weak reference to PHP object oriented code from which to draw conclusions from. Maybe, I am too used to the Java API documentation.

Anyways, after a few days with ZF, it has become apparent to me, that ZF is a very well written, powerful, extensible, and versatile PHP framework. However, due to its incomplete documentation, I would argue that its’ learning curve is fairly high, much higher than Code Igniter’s. In time though, I am sure the ZF developers will realize this, and make the effort to provide better documentation. In the meantime though, I am going to continue to use ZF and hopefully, take it upon myself to provide some insight; a Zend_Form tutorial using Zend_Config is already in the works.

Similar Posts

Add your comment

3 responses for this post

  1. Gravatar
    Wil Sinclair Says:

    Believe me, we are aware of issues with our documentation. The biggest question for me is what people really would like to see fixed. This, for example, is great feedback. Will you take the time to enter it in our issue tracker so we can address your specific concerns? The next biggest question for me is how we go about fixing the documentation as a whole. I personally plan to read through the manual cover-to-cover after the 1.5 release (I haven’t set aside the time to do this yet) and hopefully some ideas will come to mind for a good plan of action. But we can’t rely on a single person to keep the documentation great/up-to-date, so send me any ideas you might have here on how we ensure good documentation with lots of cooks in the kitchen.
    WRT Zend_Form, it’s a new component, so I’d suggest that you first make sure you’re reading the latest documentation. I’m forwarding this entry to Matthew so he’s got the specific feedback.

    Thanks for trying ZF, and I hope it treats you well! :)

    ,Wil

  2. Gravatar
    Keith Says:

    Heya,

    Here is the link I mentioned before where you can grab the first chapter of the upcoming Manning Zend book before it is released: http://www.manning.com/allen/ … Take care!

    Keith

  3. Gravatar
    Andrew Vayanis Says:

    Thanks,
    I will definitely have to take a look at that. It might prove extremely useful! :)

    Andrew

Leave a Reply