[Zope3-dev] RFC: Content Providers and Viewlets

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Oct 17 11:55:16 EDT 2005


On Saturday 15 October 2005 15:48, Gary Poster wrote:
> viewlets look like a clever pattern.  I can see that they can be
> applied to many use cases; I'll have to think about them to see how
> much I like the application compared to others we have used, but I
> have a generally favorable impression so far.
>
> contentproviders are a subset of the viewlet pattern, obviously.  But
> when do you think one might build contentproviders and not viewlets?
> Do you have concrete use cases (or even current uses) for this division?

While developing viewlets, we noticed that it was hard for us to keep the 
concerns apart. Content providers are a direct mapping to Java's content 
providers and provide a clean API to page templates, specifically. Viewlets 
are one way of using content providers to make the UI flexible. Viewlets 
fulfill a bunch of use cases Roger and I (as for SchoolTool) have. After a 
discussion with Benji this weekend, I am almost certain that viewlets will 
*not* be the base for the portlet code, since they make some assumptions 
about containment, which are very useful, but undesirable for portlets.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list