I built a Catalyst based web application some days ago, and because it was
my first Catalyst application, I built it from scratch, I used few high
level Plugins, I wrote the web logic all in the Controller, especially
“Form-handler' logic.
And then I read some Catalyst document, realized Controller should be thin
and I have a lot of plugins available which can make my code clean. So I’d
like to pick one to Handler my forms.
First, I have all those Forms already defined in my templates, so I don’t
need a module that will generate form for me, also I think let the module
generate a form for you automatically is not very good idea. Form is the
kind of thing which needs customization, a lot of customization. This
eliminate HTML::FormFu, from whose documentation, I can not found a way to
reuse my templates.
HTML::FromHandler looks better,I can quickly find the information it is
possible to reuse my template from the document, but still it’s not
perfect, I have to explicitly new a form class inside the action, I think
what I want is the code like this
sub add :Path(/add) :Form('add') {
### now we have a form object already some where, in stash for example
### do what ever we can
$form->validate_and_update
}
Maybe I can write a ActionRole for my purpose, I still need some time to try
that.