[Grok-dev] Re: Heads up: Renamed AddForm to Form
Philipp von Weitershausen
philipp at weitershausen.de
Fri Mar 16 11:40:37 EDT 2007
Martijn Faassen wrote:
> Philipp von Weitershausen wrote:
>> From the commit log message:
>> - Renamed grok.AddForm to grok.Form because there was no additional
>> functionality in that base class that was specific to adding. Yes, it
>> used formlib's AddForm, but none of the features that has to make
>> adding objects easy for you were used (adding objects in Zope 3 is
>> overly complicated anyway, thanks to IAdding). Everybody writing add
>> forms was writing his/her own actions anyway, which is exactly what
>> the point of a general grok.Form base class is.
> While I suport the reasons for grok.Form, I think it would be nice to
> reestablish grok.AddForm, and make it just be a grok.Form (at least for
> Some reasons:
> * using grok.AddForm in your own code when you need to make an add form
> communicates intent better than just grok.Form.
Okay, that follows Grok's spirit of declarative subclassing.
> * I can imagine it might be useful for introspection eventually in
> something like an admin UI (give me all add forms for this object).
> * we might at some point add a few helper methods on grok.AddForm that
> does make it different from grok.Form
I call YAGNI / "we'll cross that bridge when we come to it" on those
points. But adding an empty AddForm class isn't a big deal and I agree
with the first point.
http://worldcookery.com -- Professional Zope documentation and training
More information about the Grok-dev