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

Philipp von Weitershausen philipp at weitershausen.de
Fri Mar 16 11:47:45 EDT 2007


On 16 Mar 2007, at 11:46 , Martijn Faassen wrote:
> Philipp von Weitershausen wrote:
>> Martijn Faassen wrote:
> [snip]
>>> 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 agree. Was going to do that.

> I realize you're calling YAGNI on it, but in this case supporting  
> the YAGNI is practically the same burden as not. :)

Yup.




More information about the Grok-dev mailing list