On Monday 08 June 2009 13:52:53 Matthew Weier O'Phinney wrote:
> -- Dalibor Karlović <[email protected]> wrote
>
> (on Monday, 08 June 2009, 12:49 PM +0200):
> > On Monday 08 June 2009 11:37:29 staar2 wrote:
> > > I thought to use modular design and make some simple modules
> > >
> > > guestbook
> > > admin area
> > > comment area
> > > feedback
> > > polls
> > > news
> > > content managment
> > >
> > > But all these requires almost same CRUD functionality, forms are
> > > different database tables and presentation code. But mostly the code
> > > keeps to be same in controller part. Currently i am thinking to write
> > > this code manually so i wanted to ask for ideas for different approach.
> >
> > This is the place ZF could do with some improvement, scaffolding.
> > Basically, you describe your model with some configuration convention and
> > that should be enough for a BREAD/CRUDL cycle. I've seen some attempts to
> > solve this, but most were pretty limited.
>
> Ralph is actually working on some additions to Zend_Tool_Project for
> exactly this functionality. :)

This is great news, anything to see/test yet? IMHO, Zend_Tool is a major point 
of interest for ZF, hats of to Ralph.

> > A great leap forward would be a Zend_Grid component needed for browsing
> > (I'm writing one second time around, should really make a proposal)
>
> Personally, I'm not entirely sure this is necessary with components like
> Zend_Paginator and Dojo's dojox.DataGrid component. I've done a ton with
> those and the code is incredibly simple.

Yeah, I've seen that argument pulled a couple of times. :) The truth is many 
people can't depend on Dojo (jQuery shop here, for example).  A well though 
out grid component could be to dojox.DataGrid what Zend_Form is to 
ZendX_JQuery_Form. I have some ideas by which I've come mostly by trial & test 
(as I said, I'm in the middle of my second try) so I'd love to hear some input 
on it, probably on the core ML?

> > and providers for Zend_Tool which would configure Zend_Grid,
> > Zend_Form, generate Zend_Db_Table_Abstract instances and such. As
> > Zend_Form accepts Zend_Config (as should Zend_Grid), this could quite
> > easily become reality. Maybe we could even use some existing GUI
> > modeling tool's output for this.
>
> 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. :)

-- 
Dado

Reply via email to