Ehlo, I'm about to write a company app with dancer. I've been reading a lot about Formhandler, Formbuilder and Formfu. There are pros and cons for everyone of these :/ So, my question is a double popularity poll: . which form generator are you using ? . which form generator is still (actively) maintained ? Of course, I'm especially interested for the answers of the core developers of dancer ;) best -- erik colson ecocode.net
Not a core developer but I started using HTML::FormFu for my latest project. I hate how all the examples are in YAML, I just create my forms using code as I find the syntax more comfortable. I've used CGI::FormBuilder in the past and was relatively happy with it as well. It hasn't been updated since 2007 and there are quite a few open bugs (we patched a few locally) and their main site formbuilder.org doesn't seem to work anymore. Those are the main reasons I chose HTML::FormFu over CGI::FormBuilder. FormFu has pretty crappy documentation but once I got used to it it's ok. On Sat, Mar 12, 2011 at 4:18 AM, Erik Colson <eco@ecocode.net> wrote:
Ehlo, I'm about to write a company app with dancer. I've been reading a lot about Formhandler, Formbuilder and Formfu. There are pros and cons for everyone of these :/ So, my question is a double popularity poll: . which form generator are you using ? . which form generator is still (actively) maintained ? Of course, I'm especially interested for the answers of the core developers of dancer ;) best -- erik colson ecocode.net
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On Sat, 2011-03-12 at 13:18 +0100, Erik Colson wrote:
I'm about to write a company app with dancer. I've been reading a lot about Formhandler, Formbuilder and Formfu. There are pros and cons for everyone of these :/ So, my question is a double popularity poll:
. which form generator are you using ?
I'm using CGI::FormBuilder for Dancer::Plugin::SimpleCRUD, and it seems quite reasonable. Unfortunately, it hasn't been updated since 2007, so it doesn't look to be very actively developed, and has 20 untouched bugs on RT. I'm thinking of moving away from it. I've also used HTML::FormFu in a Dancer project for a client, and found it to do the job; I didn't do anything too clever with it, though, but it did everything I asked of it capably. A little example of using it in Dancer: any '/companies/add' => sub { my $form = HTML::FormFu->new; $form->load_config_file('forms/add-edit-company.yaml'); my $params_hashref = params; $form->process($params_hashref); if ($form->submitted_and_valid) { if (my $result = add_or_edit_company($params_hashref)) { redirect '/companies'; } else { template add_edit_company => { mode => 'Add', error => 'Failed to store new company details' }; } } else { template add_edit_company => { mode => 'Add', form => $form }; } }; As you can see, I'm passing the form to the template, and letting HTML::FormFu take care of the validation of the parameters given to it. HTML::FormFu looks to be more actively developed, but its encouragement of declaring forms and their fields in YAMLwill either please or disgust you, depending on your point of view. You can create forms and add fields to them by code, though, if you don't want your form declarations factored out into YAML files. It also declares itself beta software in the documentation, with possible API changes before it hits 1.0. Hope that may be of some use :) Cheers Dave P -- David Precious ("bigpresh") http://www.preshweb.co.uk/ "Programming is like sex. One mistake and you have to support it for the rest of your life". (Michael Sinz)
On Sat, Mar 12, 2011 at 2:18 PM, Erik Colson <eco@ecocode.net> wrote:
. which form generator are you using ? . which form generator is still (actively) maintained ?
When using Catalyst, I've used HTML::FormFu. Later on I've moved to HTML::FormHandler, and contributed some code to that, but eventually decided it was way too big and complex for what I wanted. I had to write my own wrapper for it to make it work more simply, which is sad. My most recent forms are hand-made, and I've obviously considered writing my own form handling module, but haven't yet. I just saw the following presentation and found it interesting, you might as well: http://jameslaver.com/presentations/spark/ Thinking about trying it out for future projects.
I'd definitely check out Spark. I plan to help out on a plugin with rich interaction with Dancer, but that's not for just now. On 13 March 2011 10:06, sawyer x <xsawyerx@gmail.com> wrote:
On Sat, Mar 12, 2011 at 2:18 PM, Erik Colson <eco@ecocode.net> wrote:
. which form generator are you using ? . which form generator is still (actively) maintained ?
When using Catalyst, I've used HTML::FormFu. Later on I've moved to HTML::FormHandler, and contributed some code to that, but eventually decided it was way too big and complex for what I wanted. I had to write my own wrapper for it to make it work more simply, which is sad.
My most recent forms are hand-made, and I've obviously considered writing my own form handling module, but haven't yet.
I just saw the following presentation and found it interesting, you might as well: http://jameslaver.com/presentations/spark/
Thinking about trying it out for future projects.
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
participants (5)
-
Brian E. Lozier -
damien krotkine -
David Precious -
Erik Colson -
sawyer x