Stephan Richter a écrit :
On Friday 08 February 2008, Hermann Himmelbauer wrote:
Right, that seems to be a perfect solution. Btw., it seems that there are
quite some generic widget/field-patterns that a lot of people are needing -
such as the PasswordConfirmationWidget. Or, in my case I need a
special "Email" field, that inherits from TextLine and may also have some
specific widget.

Why would you need a special widget for E-mail? You need a special field and maybe a special validator, if your field does not provide a sufficient validate() method.

Actually for all these generic patterns, it would be nice to have some ready-to-use schema fields such as IEmailTextLine, for which a specific set of converter/validator/widget is already registered.

(Searching while writing, I just found at least zw.schema (color field), ks.schema, and others hidden in specific packages like z3c.currency)

But I fear that in a near future we will need to start any interfaces.py with :
import zope.schema
import foo.schema
import bar.schema
(...)
import mycoolnamespace.schema

And any browser.py with the same million of imports. In the worst case there will be one package/egg per widget. It may be more and more difficult in the future to find in which package is located a specific feature.

I see that there are different ways to split features into eggs. This can be done by separating widget / widgets with javascript / schema fields / templates / converter / validators, or by separating by features : for example, z3c.currency is dedicated to currency support and includes both the field and the converter (but no widget).

When I first discovered and installed z3c.form, it took me a while to understand why I (optionnally) had to install z3c.formui (is there no 'ui' in z3c.form ?), and why there was another package with javascript (formjs), and now there will be a package with widgets (formwidget, so why are there widgets in z3c.form?).

This is not a complaint, this is not specific to z3c.form, and I don't have a real proposal, but I'm just wondering how this will evolve, and how newcomers will deal with this eggsplosion.

Christophe


So I'd suggest to open some repository, e.g. "z3c.formwidgets" where people
can contribute their fields/widgets so that they can be reused by others.
Moreover, this would also be a good entry point for people developing new
widgets.

+1. Let's call it "z3c.formwidget" (singular).

Regards,
Stephan

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to