[Framework-Team] Re: DataGridField for z3c.form?

Wichert Akkerman wichert at wiggy.net
Thu Sep 10 14:56:14 UTC 2009

On 9/10/09 16:43 , Martin Aspeli wrote:
>> - z3c.form produces very awful HTML
> Does that apply to the general case, or only to the case of nested
> structures like this?

To the general case. There are lots of unneeded divs, weird things like
<div class="error"><div class="error">error message</div></div> or
<div class="label"><label>some label</label></div> and even some empty 
divs <div><div/></div>. I suspect that at least 50% of the markup 
generated by z3c.form can safely be removed and the rest replaces with a 
simple set of fieldset, label, legend and form elements with perhaps an 
extra p or em for error messages.

>> - z3c.form documentation is indeed incomplete (no mention of
>> ObjectFactory)
> It's certainly better than formlibs. ;-)

The z3c.form documentation seems to follow the implementation structure 
and often reads like a doctest instead of human friendly documentation. 
It's nice that there is documentation, but it is not ideal.

>> - z3c.form you can do cool stuff with it, although I am not convinced
>> it is much better than hand-coding the form
> One of the reasons we had a woefully incomplete Plone control panel and
> relied on the ZMI for far too much up until Plone 3 was that no-one
> likes or bothers with hand-coding forms for things like that. The same
> goes for content add/edit menus and anything else that is largely schema
> driven. There's definitely a place for hand-coded forms, but it's not a
> panacea either.

I think there are two reasons that that is true: Plone did not have 
anyone the last few years with both the right skillset and necessary 
time to make good forms, and none of the form-frameworks support a mix 
of hand-written and generated forms (or perhaps they do and there is 
just no documentation for it). Going forward we should aim to do better 
and not use existing form frameworks as excuse for not doing better.

> I think you're over-generalising. The output of a z3c.form form is not
> any worse than what we have with formlib or Archetypes (in fact, it's
> probably better, and it's certainly easier to standardise).

 From what I've seen today it is worse than Archetypes. Perhaps we have 
different criteria of what good markup should look like.


More information about the Framework-Team mailing list