[Catalyst-dev] RFC: Changing Tutorial From HTML::Widget to C::C::FormBuilder

John Napiorkowski jjn1056 at yahoo.com
Tue Feb 27 15:15:20 GMT 2007



----- Original Message ----
From: "hkclark at gmail.com" <hkclark at gmail.com>
To: Development of the elegant MVC web framework <catalyst-dev at lists.rawmod=
e.org>
Sent: Tuesday, February 27, 2007 8:50:28 AM
Subject: [Catalyst-dev] RFC: Changing Tutorial From HTML::Widget to C::C::F=
ormBuilder

Hi Everyone,

I have been thinking for a while that we need to get away from HTML::Widget=
 with the tutorial.  The current version on CPAN does not install without a=
 force and it sounds like maintenance has come to an end.  =



In terms of which module should be used for form management, validation, an=
d related stuff, I seem to be seeing 3 main options discussed on the list a=
nd in #catalyst (in no particular order):
1) HTML::FormFu

2) Catalyst::Controller::FormBuilder

3) Reaction


I haven't had a chance to experiment with Option 1 yet, but judging from em=
ail on the list, it sounds like Carl has done some great things with it.  I=
 saw posts where it sounds like Carl has positioned FormFu as a replacement=
 for H::W, but I'm not sure if it's a backward compatible sort of "drop in"=
 replacement or a totally different approach (IOW, if we put FormFu in the =
tutorial, I don't know if we could migrate the existing Advanced CRUD secti=
on to FormFu or if it would require a total re-write because they are too d=
ifferent).  Comments welcome on that.


I have been working with C::C::FormBuilding lately and I like it.  I like h=
ow it let's you define your forms using YAML in .fb files... to me, that se=
ems much cleaner that cluttering up my controller with the stuff I used to =
do with HTML::Widget.  FormBuilder seems to have a loyal following outside =
of Catalyst, so it should be sticking around for a while.  I believe Jonath=
an Rockway will be covering FormBuilding as the primary form maintenance an=
d validation module in his upcoming book.


I spent a little time working with Reaction, but I'm still a newbie for sur=
e.  It certainly sounds like the "Holy Grail" option for not just form mana=
gement, but better design of your views and models.  However, it sounds lik=
e it would still be a bit early to put that in the tutorial and have it be =
seen as a "best practice."  Also, even when Reaction is "finished," it stil=
l might be good to have something "less complex" or "more traditional" disc=
ussed first in the tutorial, with Reaction being a different section (or se=
ctions) that cover more than just forms (get into it's unique approach to v=
iews and models).


So, I have been thinking this might make sense:

1) Replace the existing "Advanced CRUD" section 8 with a C::C::FormBuilder =
section
2) When we are ready, add another section (or more) that covers Reaction (I=
OW, first teach FormBuilder just for forms and then teach Reaction as the m=
ore "comprehensive" solution)

3) Re the existing Advanced CRUD section that discusses HTML::Widget, I see=
 several options:
  a) Delete it altogether
  b) Put it at the end as a deprecated section in case some people are stil=
l interested
  c) Migrate it to FormFu


What do people think?

Thanks,
Kennedy

I've been playing with the FormFu stuff and have been liking it, but it's n=
ot a drop in replacement for HTML::Widget.  In the end it will be similar t=
o Formbuilder in that it will allow you to use a configuration file and hav=
e great Catalyst intergration with a controller and all the goodies.  So fa=
r I have found FormFu to give me better control over the CSS, but I might j=
ust be ignorant of the best way to use Formbuilder.

I do think this needs to be done since over the past few months the few Per=
l developers that I introduced Catalyst too got turned off by the trouble i=
nstalling HTML::Widget and the feeling that "It's not so easy to do easy th=
ings" with it.  I don't think I agree with that, but that was the response =
I was getting.  Being able to declare forms with a config file (a solution =
that both Formbuilder and FormFu support) helps with this a lot.

Although I'm personally using FormFu right now, if we are going to fix the =
tutorial today I'd lean toward Formbuilder, since it's been stable for a wh=
ile and the community is large.  I think there are quite a few Catalyst pro=
grammers that have used this now and can help newbies on the mailing list, =
which is very important.

If we have both Formbuilder and FormFu in the tutorial we should have a sol=
id table of pros and cons for each system to help newbies decide which to u=
se.

Saying that, I'd personally be interested in anything that would help under=
standing Reaction.  I feel I've learned a lot just reading and trying to un=
derstand the code for this and in the end it's a lot more than for forms.  =
I don't think it's much more complicated than the other systems floating ar=
ound, just it's using some new concepts and technique for Perl, such as Moo=
se.  If Reaction ends up in the tutorial it probably belongs in a section t=
hat in more than just about doing CRUD, but more like an advanced best prac=
tices section.

--john





 =

___________________________________________________________________________=
_________
The fish are biting. =

Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20070227/9=
6d753d2/attachment.htm


More information about the Catalyst-dev mailing list