On Mon, Jun 8, 2009 at 2:50 PM, Dalibor Karlović <[email protected]> wrote:

> On Monday 08 June 2009 13:52:53 Matthew Weier O'Phinney wrote:
> > I'd *love* to see someone tackle the DB schema => Zend_Form problem
> > sometime -- it's something I envisioned from the outset when developing
> > Zend_Form, but never had a chance to work on.
>
> The problem is the same as is with regular models, if you have a 1:1
> relationship with the table, you're good, but things start to complicate
> real
> fast. :)
>
> What I love as an idea is to write some XML/INI/yaml/whatever and you're
> basically done: the framework generates your schema (Doctrine, anybody?)
> and
> completes your CRUDL cycle. Do this a couple of times and you get a working
> backend/admin/whatever. As your models already returns some data, you can
> start working on the frontend in an instant. Now, that's putting R in RAD.
> :)
>

I am working on on-the-fly generation of forms based on doctrine models.
I've started refactoring some weeks ago when I reached 1000 lines of code.
However, Doctrine is not part of ZF.
The problem with doing that with Zend_Db is that is, as the name suggests,
database-centered. While Zend_Db queries the tables for metadata, in
Doctrine you define metadata and let it generate the tables for you, for any
dbms you need; also validation is defined in metadata so should be trivial
to validate Zend_Form basing on a Doctrine_Record object. Problems rise with
relationships (selects and subforms, inserting new dependent records,
populating selects).


-- 
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://ossigeno.sourceforge.net

Reply via email to