[ Model and backend interface generators for Zend Framework ]

By doing some research, one of the disadvantages often reported about Zend Framework is the amount of work required to get off the ground. For me this could be addressed if ZF had strong model and backend interface generators like Symfony does. I have been looking for those and here is what I found:

Model generators

Backend interfaces

As usual one can use database administration tools

Backend interface generators

Setting up the interface seems to be quite easy, for instance here is how you would display a form to edit contacts on the same page as you would edit members:

<?php
class MemberContacts extends Kwf_Model_Db
{
    protected $_table = 'member_contacts';
    protected $_referenceMap = array(
        'Member' => array(
            'column'           => 'member_id',
            'refModelClass'     => 'Members',
        )
    );
}
?>

enter image description here

A demo of Koala frameworks is available. To be honest it looks quite impressive.

Q: Which model generators and backend interface (generators) do you use for Zend and why?

Answer 1


I do not use any kind of generator, prepared backoffice or so called scaffolding.

Why I don't use them in a general way ?

These tools introduce a strong dependencies on the way the generated UI is structured, you do not have anymore the power to design it the exact way you want.

They are quite hard to reuse unless you know them very well, they introduce a lot of magic, for example when I create a backoffice using Django I've to set five parameters and I've a backoffice running. Understanding how it works do really need a lot of knowledge on the inner mechanisms of the tool, so updating it can be a real pain.

To my mind there's a strong difference between providing almost complete backoffice application like Symfony, Rails and Django do, and what Zend Framework do: constraining to general framework and libraries.

There is a deliberate choice between something working out of the box and something flexible. I think they tend to aim different needs.

I tend to prefer the Zend Framework approach since I'm not satisfied (nor experienced I've to admit it) with what others offer as an "almost done" UI.

Why I won't ever use them in Zend Framework ?

If Zend Framework doesn't embend such tools, I won't plug what others have tried to build upon it since nothing can guaranty that there won't be any regression on it (and upgrading can be a really good thing since Zend always integrate more and more external services). The power of Zend Framework is its flexibility, by overlapping tools over it, you're going against the philosophy of the product.

It might meet your expectation on really small project, but for bigger one I do really suggest you to build your UI according to your own needs, the backoffice will only take only you one or two weeks more.