Ticket #926 (new enhancement) — at Version 2
Pick a simpler form framework
Reported by: | sebbacon | Owned by: | sebbacon |
---|---|---|---|
Priority: | critical | Milestone: | ckan-v1.4-sprint-1 |
Component: | ckan | Keywords: | forms |
Cc: | Repository: | ||
Theme: |
Description (last modified by rgrp) (diff)
The current formalchemy setup conflates view, controller and model code in a way that makes it hard to debug and customise.
Review existing (and potentially non-existing) frameworks with a view to porting forms over to something more explicit and lightweight.
Implement the current Package forms as an example of how this would work.
Document and circulate.
Sub-ticket of #961 (form, validation, model sync meta-ticket)
Change History
Note: See
TracTickets for help on using
tickets.
Comments from RP - http://lists.okfn.org/pipermail/ckan-dev/2011-January/000181.html
Libraries I have used: FormEncode?, FormAlchemy? (what we are currently using, before that formencode).
Neither seemed perfect but I think the form issue is a 'hard' problem (perhaps with no perfect answer) [1]. FormAlchemy?, in retrospect, was probably a mistake as it merges too much model/validation/form generation into one thing.
At least 3 functions involved:
previous step)
I think one can and should separate 1 from 2+3 (and one of problems with formalchemy is it doesn't -- the attraction being you don't repeat yourself as forms get generated from model but I think this is actually a false economy in medium-term).
I'm not specifically recommending the following as I haven't used them but I've looked through docs, they are active and reasonably mature: