[Catalyst] question from tutorial - does creating HTML
in acontroller using HTML::Widget violate MVC?
Christopher H. Laco
claco at chrislaco.com
Wed Dec 6 18:25:09 GMT 2006
Hermida, Leandro wrote:
>>> On Wed, 6 Dec 2006, Matt S Trout wrote:
>>>> I wouldn't use HTML::Widget at all. The people who took over maint
>>>> after sebastian gave up on it have struggled valiantly to make it =
>>>> useful and production quality and so far as I'm concerned =
>>>> failed. Not one of his better experiments :)
>>> So what's considered best practice in this area, is it still =
>>> Data::FormValidator or should we be looking at something else ?
>> I hate that, the ::Simple variety and CGI::FormBuilder least =
>> out of the current CPAN-able options.
> Sorry my lack of English understanding today - but does the
> above mean that Data::FormValidator, Data::FormValidator::Simple
> and CGI::FormBuilder are NOT good choices? What do experienced
> Catalyst users think are the best CPAN choices for:
> 1) Form validation and processing
> 2) Form building
> I guess it should be noted that if HTML::Widget shouldn't be used
> in the ways that it was in the tutorial than it should be completely
> replaced with the CPAN module that most Catalyst users think =
> should be there.
> Thanks in advance,
It depends. I prefer not to build my forms from objects. Sometimes, the
form is not like the object where the data is going into, or maybe the
form spans multiple relationships in a join.
When I need to customize the form validation heavily...aka errors
messages, validaiton profiles, load those from files, etc, I stick with
FormValidator::Simple and/or Data::FormValidator.
When I'm doing forms that are 1-1 with the objects (CRUD-like
operations), then I'm all for widget all-in-one form validators/generators.
Try as all of them have, there is not one solution in this area, and
this topic is akin to vi vs. emacs in some respects.
THe one true answer is: it depends on the situation, the requirements
and how each app needs to go about doing it in its problem domain.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061206/6075=
More information about the Catalyst