[Html-widget] formfu contributions?

John Napiorkowski jjn1056 at yahoo.com
Mon Mar 19 14:45:51 GMT 2007


---- Original Message ----
From: Carl Franks <fireartist at gmail.com>
To: html-widget at lists.rawmode.org
Sent: Friday, March 16, 2007 9:17:29 AM
Subject: Re: [Html-widget] formfu contributions?

On 16/03/07, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
> On 3/15/07, Mario Minati <mario.minati at googlemail.com> wrote:
> > For me that is nothing that should be part of FormFu (as it's concentrated on
> > Forms) but maybe of LayoutFu (which could connect closely to FormFu).
>
> The most common complaint about HTML::Widget was that it breaks the
> division between the Controller and the View - by realizing layout in
> the Controller.  We have the various templating languages that work
> for layout quite well and I don't think we need another one.  But we
> do need some sane way of delegating the layout functions from FormFu
> to the templating system. This was discussed quite extensively here -
> but still I don't see any adequate answer to this issue. What I would
> propose is a two way approach - first you should be able to start with
> just using [% form %] in the template for the page and [% form.css %]
> in the template for CSS and get some sane layout. Then there should be
> a way to gradually move parts of what [% form %] generates into the
> template - so that if you are not happy with the generated HTML you
> can replace it gradually chunk by chunk.

okay, but I don't this is what John was refering to with
    "more general system for creating blocks and page regions"

Sorry I dropped off for a while after asking a question like this.  My project that was due at the end of the month suddenly became due last week. However I'm pleased because it looks like I'll be able to release my work on CPAN for once.

What I meant by this question/comment was more of a thought experiment, and to be honest I'm not sure if in the end it is a useful one.  One thing that I didn't like about HTML::Widget is how it make me feel like I was doing layout/declarative work in serveral places.  Typically I created my HTML::Widget forms by subclassing a custom catalyst model that I created to gloss over some of the things I hand trouble with.  Then this model would have a bunch of statements to create the form.  Although this was written in Perl, it was almost always all declarative code, no logic, so it's the kind of thing that would work well as a config file or as something embedded into the template.  Then I would have a separate template.  So even though I could break the form down in the template in order to do very customized css and layout, it really felt like I was doing the same thing in two places and having a lot of class explosion.  And since the form stuff was in perl I couldn't assign
 the grunt work to my designers in the same way my peers using JSP/JSF could do.

Seems like formfu is a step toward fixing this, since the designers can work with the configuration file, as you mentioned below.

Part of this trouble in my head I am sure is due to my inexperience with developing these kinds of applications.  So if my thoughts here make no sense I would be please to hear that so that I can stop worrying :)

Another thing that inspired this thought was when I was playing with Google's web toolkit (http://code.google.com/webtoolkit/)  I was thinking that something similar for Perl would be killer in combination with Catalyst.  So that's something I was playing with last month before I had to put it down to work on something I'm actually getting paid for.

BTW, I finally got my google account and have some time aside to work on my imager code and the abstraction code for loading configuration files.  Let me know what you think should be my next steps with this (I assume you'd like me to work out of a branch on the code)

Thanks!

_John

Regarding what you describe - you need to come up with a suggested
API, because I don't know what you mean by "replace it gradually chunk
by chunk".
What do you actually want to be able to do?

There are currently several ways you can work.
#1
[% form %]

#2
To allow a designer to rearrange fields or change attributes, define
the form fields in a config file, and let them edit that.
If you want to make it as simple as possible for them, have a seperate
config file for just the fields, and use a different config file they
don't have access to for form options, field constraints, etc.

#3
To edit the XHTML - each project has its own copy of the 'root'
directory containing the TT templates - edit them, that's what they're
there for.

#4
Render each section chunk-by-chunk with the likes of
[% f.start_form %]
[% f.hidden_fields %]
[% f.end_form %]
[% f.field('foo') %]
etc

What else could you want? ;)
Carl

_______________________________________________
Html-widget mailing list
Html-widget at lists.rawmode.org
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget





 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL



More information about the Html-widget mailing list