[Dancer-users] complex form building

WK wanradt at gmail.com
Wed Mar 30 00:52:27 CEST 2011


Terr!

At the beginning i'd like to thank you all of Dancer developers. I
really like to Dance (despite i know too few steps so far) and as
readed over whole list archive, it is so good to see which huge
improvement is done during the last year.

I have an old app, CGI.pm based, fully handy-crafted, designed 1998 as
my first Big solution and during all these years i hacked it as far as
it needed. I'd like to write it up from scratch again, using Dancer. I
looking Mates for this dance and i'd like to find matching ones.

One problem is *form building*.

I looked sawyer x Spark-presentation (http://sck.to/TW) and if i got
it right, nested forms may be right step for me. Still, i'd like to
read opinions of yours, from your knowledge and experience.

I asked help also in StackOverflow (http://sck.to/O5), and i paste
same question here. Maybe my wording is too foggy, so, please ask,
i'll try to explain.

----
I'm experimenting with Dancer some time, and looking for the right
blocks to build my application. Frameworks tend to have flat example
applications, dealing with one table at time. So I have no good idea
which tools should be used to build a little bit more complex CRUD
forms.

Let's say I create a Booklovers app. It should have a form to add/edit
books with authors. To cover this I need 3 tables in our database:
books, authors and books_to_authors. Which is best way to build a form
to add a book with authors?

Note:

* It is not known how many authors a book may have, we need dynamic
adding of rows.
* The authors table may have tens of thousands of records, so a select
form element is not suitable.
* An author may be missing from our database, we need to add them
dynamically, too.

All these dynamic parts needs some AJAX. Is there a good solution to
integrate it with form creating tools in Perl? I looked at
CGI::FormBuilder and am still looking, but I did not find something
that could build forms for 3 joined tables (many-to-many) as
described. The dynamic client-side part also still needs to be
covered.

Are there some best practices for such a pretty simple case?
----


TIA

Btw, one of most important things of choosing Dancer was Unicode
support. I am so tired of tools, frameworks, orm-s, libraries,
anything which don't support utf-8 in a simple, clean way :) It is
really important to support utf-8 on 2011!

-- 

Wbr
Kõike hääd,

Gunnar


More information about the Dancer-users mailing list