In search of the one true Web component framework and Genshi Renderer

10 views
Skip to first unread message

Jimmy Yuen Ho Wong

unread,
Nov 21, 2010, 9:18:18 AM11/21/10
to ish.io
Hi everyone,

Over the past few years or so I've been going from straight Genshi
+JQueryUI to Toscawidgets to FormAlchemy to Formish and then now I
just found out there's a new kid on the block called Deform
http://docs.repoze.org/deform/ that's similar to Formish.

The reason I've been looking at all of these frameworks is because of
the following reasons:

1. Flexible and extensible - I need to be able to compose and
customize widgets and components anyway I want, i.e. I don't want to
have to scratch my head out trying to put an anchor into a form with a
customized onclick action.

2. Must have browser readable templates, i.e. I want to able to just
give my designers the HTML templates and they'll be able to see it on
the browser without any weird %{}$ clogging up the screen.

3. Must have good type conversion/validation functionality that keeps
the 2 jobs separate.

4. Doesn't reiterate the BS that all form widgets get turned into
database rows, thus I should just use the database entities as a
schema.

So far I'd say that Formish and Deform is the closest to what I want,
however I'd like to hear what you guys think before I decide on one.
AFAIK, Formish hasn't seen a whole lot of development since the
beginning of this year and it lacks a renderer for Genshi/ZPT/
Chameleon. On the other hand, Deform doesn't do #3 very well and
Chameleon (Deform's template engine) doesn't have a very good Genshi
implementation (it doesn't take the params Genshi does and can't do
stream filtering).

P.S. I've done some work trying to give Formish a Genshi renderer, but
since the form widget now has a default renderer that is Mako-based,
and some widgets have a bunch of methods that are there solely for
form element attribute generation (which is unnecessary for Genshi and
a lot of other template engines), I'd assume that having Formish to
use any renderer other than Mako will require some sort of new
configuration mechanism and/or code refactoring. If you guys are
interested, I'd be happy to discuss what needs to be done in order to
merge my changes back to Formish.

Matt Goodall

unread,
Nov 21, 2010, 4:09:27 PM11/21/10
to is...@googlegroups.com
On 21 November 2010 14:18, Jimmy Yuen Ho Wong <wyu...@gmail.com> wrote:
> Hi everyone,

Hi :)

>
> Over the past few years or so I've been going from straight Genshi
> +JQueryUI to Toscawidgets to FormAlchemy to Formish and then now I
> just found out there's a new kid on the block called Deform
> http://docs.repoze.org/deform/ that's similar to Formish.

Deform is basically Chris McDonough's take on Formish. Chris (quite
rightly in my opinion) wasn't happy with the level of test coverage in
Formish and decided it would be easier to start a new project.
Although I wish Chris had contributed to Formish instead I can't
really blame him either.

I've not really played with Deform so cannot comment on it much apart
from saying that I'm not especially keen on Peppercorn,
http://docs.repoze.org/peppercorn/. The use of hidden form fields to
switch the form's data namespace offends me ;-) and, AFAICT, means
that you're not able to move fields around the page as freely. Whether
that matters in practice I cannot say.

>
> The reason I've been looking at all of these frameworks is because of
> the following reasons:
>
> 1. Flexible and extensible - I need to be able to compose and
> customize widgets and components anyway I want, i.e. I don't want to
> have to scratch my head out trying to put an anchor into a form with a
> customized onclick action.
>
> 2. Must have browser readable templates, i.e. I want to able to just
> give my designers the HTML templates and they'll be able to see it on
> the browser without any weird %{}$ clogging up the screen.
>
> 3. Must have good type conversion/validation functionality that keeps
> the 2 jobs separate.

Hurray! Not many people seem to consider this as useful/important.

>
> 4. Doesn't reiterate the BS that all form widgets get turned into
> database rows, thus I should just use the database entities as a
> schema.
>
> So far I'd say that Formish and Deform is the closest to what I want,
> however I'd like to hear what you guys think before I decide on one.
> AFAIK, Formish hasn't seen a whole lot of development since the
> beginning of this year and it lacks a renderer for Genshi/ZPT/
> Chameleon. On the other hand, Deform doesn't do #3 very well and
> Chameleon (Deform's template engine) doesn't have a very good Genshi
> implementation (it doesn't take the params Genshi does and can't do
> stream filtering).

You're correct, Formish hasn't seen much development recently but it's
actively used on a number of web sites. I designed the initial
prototype of Formish, based on previous experience with Nevow, but Tim
Parkin did the vast majority of the development so it was essentially
his project. Unfortunately, Tim's gone off to do other things and I'm
just not managing to find the time to work on Formish right now.
Basically, I need help!

>
> P.S. I've done some work trying to give Formish a Genshi renderer, but
> since the form widget now has a default renderer that is Mako-based,
> and some widgets have a bunch of methods that are there solely for
> form element attribute generation (which is unnecessary for Genshi and
> a lot of other template engines), I'd assume that having Formish to
> use any renderer other than Mako will require some sort of new
> configuration mechanism and/or code refactoring. If you guys are
> interested, I'd be happy to discuss what needs to be done in order to
> merge my changes back to Formish.

I'm definitely interested, and I'd be prepared to change anything
related to rendering to make it easier to work with other templating
engines.

- Matt

Kiran Jonnalagadda

unread,
Nov 22, 2010, 4:27:39 AM11/22/10
to is...@googlegroups.com
On Mon, Nov 22, 2010 at 2:39 AM, Matt Goodall <matt.g...@gmail.com> wrote:
I've not really played with Deform so cannot comment on it much apart
from saying that I'm not especially keen on Peppercorn,
http://docs.repoze.org/peppercorn/. The use of hidden form fields to
switch the form's data namespace offends me ;-) and, AFAICT, means
that you're not able to move fields around the page as freely. Whether
that matters in practice I cannot say.

One of the problems with this is Ajax validation of a single field at a time. With Peppercorn, the whole form must be submitted and parsed to retrieve the value of a single field.

Tim Hoffman

unread,
Nov 22, 2010, 8:30:47 AM11/22/10
to ish.io
Hi

Chrism also ported formish to chameleon. See http://docs.repoze.org/repoze.bfg.formish/

Rgds

T

On Nov 21, 10:18 pm, Jimmy Yuen Ho Wong <wyue...@gmail.com> wrote:
> Hi everyone,
>
> Over the past few years or so I've been going from straight Genshi
> +JQueryUI to Toscawidgets to FormAlchemy to Formish and then now I
> just found out there's a new kid on the block called Deformhttp://docs.repoze.org/deform/that's similar to Formish.

Tim Hoffman

unread,
Nov 22, 2010, 8:36:52 AM11/22/10
to ish.io
Hi

I am successfully using formish (with the mako renderer) inside zpt
templates.
As much as I am not keen on mako syntax, customizing mako templates
for formish
wasn't that hard. It did mean I had to learn another template
language,
but I haven't really seen it as a problem.

Also Formish has a few features that I haven't seen in deform yet,
one being the filestore.

Neither deal with late binding of data particularly well for lookups
(choices)
and validation. You have to build you own tools for extending the
schema
if you want to achieve this in a declarative style.

Rgds

T

On Nov 21, 10:18 pm, Jimmy Yuen Ho Wong <wyue...@gmail.com> wrote:
> Hi everyone,
>
> Over the past few years or so I've been going from straight Genshi
> +JQueryUI to Toscawidgets to FormAlchemy to Formish and then now I
> just found out there's a new kid on the block called Deformhttp://docs.repoze.org/deform/that's similar to Formish.

Tim Hoffman

unread,
Nov 22, 2010, 8:57:39 AM11/22/10
to ish.io
Hi

Chris just corrected me on 2 points. Sorry to chrism for providing
inaccurate
information about deform.

1. Filestore equivalent does exist - http://svn.repoze.org/deform/trunk/deform/interfaces.py
2. Late binding has been implemented - http://docs.repoze.org/colander/binding.html

Again apologies to chris on this one.

Rgds

T

On Nov 22, 9:36 pm, Tim Hoffman <zutes...@gmail.com> wrote:
> Hi
>
> I am successfully using formish (with the mako renderer) inside zpt
> templates.
> As much as I am not keen on mako syntax, customizing mako templates
> for formish
> wasn't that hard.  It did mean I had to learn another template
> language,
> but I haven't really seen it as a problem.
>
> Also Formish has a few features that I haven't seen in deform yet,
> one being the filestore.
>
> Neither deal with late binding of data particularly well for lookups
> (choices)
> and validation.  You have to build you own tools for extending the
> schema
> if you want to achieve this in a declarative style.
>
> Rgds
>
> T
>
> On Nov 21, 10:18 pm, Jimmy Yuen Ho Wong <wyue...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > Over the past few years or so I've been going from straight Genshi
> > +JQueryUI to Toscawidgets to FormAlchemy to Formish and then now I
> > just found out there's a new kid on the block called Deformhttp://docs.repoze.org/deform/that'ssimilar to Formish.
Reply all
Reply to author
Forward
0 new messages