[Catalyst] Re: HTML::FormFu and Rose::DB::Object?
Peter Karman
peter at peknet.com
Wed Apr 4 14:41:44 GMT 2007
Quinn Weaver scribbled on 4/4/07 1:12 AM:
> Bill Moseley wrote:
>
>> On Tue, Apr 03, 2007 at 08:53:32PM -0700, Quinn Weaver wrote:
>>
>>> In contrast to FormBuilder, RHTMLO wants you to write your HTML form
>>> by calling Perl methods, somewhat in the spirit of CGI.pm. This makes
>>> it hard for design people to edit the form.
>> Maybe I'm not understanding that paragraph, but in RHTMLO (IIRC) you
>> can do [% form.field('foo').xhtml %] in a template. What are
>> you thinking would be easier for the design people?
>
> No, you're right. I didn't catch that possibility, though it's
> implicit in the documentation. Partly because the docs tell you the
> details of all the methods you can call, but not the big picture of
> what they're good for--in other words, they're etic, not emic.
>
yes, the docs are often very exhaustive (exhausting) but sometimes lacking in
more simple overviews. That's partly why I put together the CatRose example.
Check out the example .tt files in the CatRose app in the C::C::Rose package,
especially edit.tt and view.tt.
You'll see that those are generic form templates, but in my apps I often
override with specific form generation if it doesn't fit the generic model. Just
like a real web designer would. ;)
I find that defining the form in YAML is one level removed from the XHTML
itself, so I just define a base RHTMLO class with default labels for all my
fields, and then do whatever the business requirements demand in the actual .tt
files.
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the Catalyst
mailing list