[Grok-dev] Re: Heads up: Renamed AddForm to Form

Martijn Faassen faassen at startifact.com
Fri Mar 16 11:46:15 EDT 2007

Philipp von Weitershausen wrote:
> Martijn Faassen wrote:
>> 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 now).
>> 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.
> Will do.

I'd suggest making a true subclass for grok.AddForm instead of only a 
name assignment from grok.From, by the way, for the reason of 
introspection potential and because it doesn't decrease readability. I 
realize you're calling YAGNI on it, but in this case supporting the 
YAGNI is practically the same burden as not. :)



More information about the Grok-dev mailing list