On Wed, Mar 23, 2011 at 10:31 AM, nh2 <[email protected]> wrote:
> Hi,
> for developing web applications with Pylons, Pyramid and Turbogears, we have
> to make a decision on what form library to choose.

I've started writing a comparative demo of several form libraries, but
it's just started so it'll take a while. I'm intending to show the
same form+validation implemented in several libraries in parallel,
tied to a SQLAlchemy record for those libraries that support it (but
not storing it in a database). If anyone has any ideas on libraries to
consider or what a good demo form would be, I'd like to hear them.

My current plan is:
- A calculator form with 'term_a', 'operator' (pulldown: +,-,*,/),
'term_b'; storing the last 10 calculations in the session.
- Deform, FormEncode+htmlfill+WebHelpers tags, Formish, WTForms,
FormAlchemy, and (if I can get it to work) ToscaWidgets
- pyramid_simpleform for organizing the code

> It looks like there are quite some form libraries around: Toscawidgets 1,
> Toscawidgets 2, Sprox, formish, deform and maybe even more.
> I have a very hard time to pick from these, as many of them seem to be last
> updated in mid 2010 and the documentation of some of them is quite poor,
> nonexistent or hidden
> (like https://bitbucket.org/paj/tw2.sqla/src/c6a852e66806/docs/).
> So I have the following questions:
> 1. Could someone make a comparison of the basic philosophies, differences
> and similarities?
> 2. Which ones are deprecated, which ones are actively maintained? On which
> ones could we rely in case we move to Pylons 1.0 to Pyramid?
> 3. What do you recommend for creating database generated forms (ala Sprox)?
> Is tw2.sqla more than a 2010 alpha project?
> 4. Does Sprox work on top of Toscawidgets 2?

1) Below.
2) None is deprecated, but FormEncode is lightly maintained.
3) I haven't done this but FormAlchemy should work. Sprox is more
ambitions so I don't know how "finished" it is. I don't know about
tw2.sqla at all.
4) I don't know.


- FormEncode+htmlfill+webhelpers.html.tags :
  * Pylons: default stack. Widely used in production.
  * Pyramid: should work.
  * Philosophy: minimalist.
  * Renderer: the tag helpers are basic functions generating form input tags.
  * Validator: one of the first Python validators to support only
validation, not rendering.
  * Advantages: widely used. FormEncode is very flexible for a variety
of web and non-web uses.
  * Disdvantages: FormEncode manual is unfocused, some validators &
features are undocumented, code is lightly maintained.

- Deform + Colander + pyramid_deform + peppercorn:
  * Pylons: few users were aware of it until Pyramid
  * Pyramid: written by Pyramid core developer ChrisM.
  * Philosophy: modular. Derived from Formish as a refactoring,
probably due to programming-style reasons (and unittests?) rather than
substance.
  * Renderer: Deform.
  * Validator: Colander
  * Advantages: may be an emerging Pyramid standard (I think users are
still evaluating whether it's suitable for that role)
  * Disadvantages: fewer advanced validators compared to
Formish/FormEncode? Maybe fewer features?

- Formish + Validatish + Convertish + Schemaish
  * Py,lons: few users were aware of it until Pyramid
  * Pyramid: ?
  * Philosophy: modular.
  * Renderer: Formish.
  * Validator: Validatish.
  * Advantages: ?
  * Disadvantages: ?

- WTForms
  * Pylons: some usage. Pylons considered it to replace FormEncode as
the default, but rejected as too big a change, and doesn't address a
few edge use cases of FormEncode.
  * Pyramd: ?
  * Philosophy: modular, but not multi-distribution like Deform/Formish.
  * Renderer: built-in
  * Validator: built-in
  * Advantages: more pythonic than FormEncode, by some opinions
  * Disadvantages: web-centrism may get in way of non-web usage,
unlike FormEncode

FormAlchemy
  * Pylons: some usage.
  * Pyramid: ?
  * Philosophy: automatically generate widgets for fields in
SQLAlchemy ORM objects. (Not usable outside this context.)
  * Renderer: built-in
  * Validator: built-in
  * Advantages: generate forms in few lines of code
  * Disadvantages: less ability to customize forms than the
minimal/modular libraries

ToscaWidgets 1
  * TurboGears: default library
  * Pylons: some usage
  * Pyramid: ?
  * Philosophy: bundle HTML, styles, Javascript under a widget class
  * Renderer: built-in
  * Validator: none, most users use FormEncode
  * Advantages: build complex widgets and composite widgets with
bundled styles and Javascript
  * Disadvantages: some users find it a steep learning curve;
documentation was minimal although that may have gotten better

ToscaWidgets 2
  * I didn't know this existed so I don't know how it differs from TW1

Sprox
  * Like FormAlchemy but more plugin-based. It uses SQLAlchemy and
ToscaWidgets but says it can accommodate other database and widget
libraries. I don't know much about it.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to