[Grok-dev] Grok's update/render pattern

Wichert Akkerman wichert at wiggy.net
Mon Jul 14 04:39:13 EDT 2008

Previously Graham Stratton wrote:
> Sorry to bring this up again, but it's causing me confusion.
> Grok defines the way that the update/render pattern works differently  
> from zope.contentprovider.  The contentprovider API states that the  
> update method is used only to update the underlying objects based on  
> the request, whereas the render method does everything to do with  
> rendering.
> In grok, the update method is used to set attributes on the view to be  
> used in templates, and would perhaps be better named 'prepare'. This  
> is fundamentally different, and rather confusing. This is especially  
> so for people using viewlets with grok, where the API inherits from  
> zope.contentprovider.

This is not grok-specific but a very common pattern. I see the same
pattern used very often in Plone. 


Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

More information about the Grok-dev mailing list