[Catalyst] Forms generation

Matt S Trout dbix-class at trout.me.uk
Fri Jun 15 12:35:56 GMT 2007


On Thu, Jun 14, 2007 at 08:03:53PM -0700, mreece at vinq.com wrote:
> i'll probably realize that as soon as i try to swap DFV for RHTMF or
> other, and wish i had abstracted or adopted a general API, but until then
> i'm happy enough with models returning DFV validation closures, et al..
> 
> but only if that also supports my goal of not having the authoritative
> list of fields to be rendered defined in a .pm or .yml file, but in the
> .html template where it belongs imho.

I'm not sure it always does.

In fact, I don't think it always belongs anywhere :)

Sometimes you'll want to select the fields in the view (not necessarily the
template itself, but at least in something that belongs to the view, not
anything else).

But equally, sometimes you'll want to be able to say "just render all
applicable fields" - for e.g. for uniform CRUD type stuff, so when the model
changes you don't have to run round updating all the templates.

Getting DRY and clean factoring for this stuff can be ... interesting.

I think the Reaction model is a damn good stab at this with the new
widget-oriented view layer I've checked in recently; I'll try and post some
examples to the list soon so people can see what I'm gibbering about.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list