[Grok-dev] Grok 1.0 final?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Wed Apr 15 11:25:38 EDT 2009


Martijn Faassen wrote:
snip
>> Can you elaborate on this? What does the subclassing support do?
> 
> Currently you when you try to define a common base class for views Grok 
> tends to get confused and may try to associate with the wrong templates 
> and so on.
> 
> JW can elaborate on this and give practical use cases.

If you define a view component in one module and subclass it in another
module the template associated to the baseclass cannot be found anymore.

This seemingly simple problem proofed to be very difficult to reason
about and solve as it involved edgy edge cases in how module-level
directives and their defaults are handled in martian.

As result Martijn and I have been (on and off) working on getting the
module-level directive default straightened out and also concluded Grok
would be simpler to use if we'd split the View component into a
view-with-template-component and view-with-just-a-render-method component.

For backwards compatibility the first will keep the name "View" and the
latter will be called "CodeView".

This still has to land. I'm making some progress (in the
http://svn.zope.org/grok/branches/jw-newer-martian/ branch) but only slowly.

Martijn - what about a pair-programming-date!? ;)


regards,
jw



More information about the Grok-dev mailing list