[Zope3-dev] Re: Page Architecture: Term suggestions

Jean-Marc Orliaguet jmo at ita.chalmers.se
Sat Dec 4 10:24:20 EST 2004


Dominik Huber wrote:

>>I do not know what 'pagelet' or 'portlet' exactly means.
>>    
>>
>I had the same problem when roger introduzed his paglet
>implementation.
>So I started to write down his explanation. After a few iteration he
>agreed with the following comprehension of mine.
>
>May it helps or not ;)
>
>Regards,
>Dominik
>
>...src\zope\app\pagelet\README.txt (*logical, not implementation
>classes)
>...
>                      _________ 
>                     |         |
>                     | Context |
>                     |_________|
>                          ^
>                          | 
>                          |*
>                      ____|____ 
>                     |         |
>                     |   View  |
>                     |_________|
>                          |
>                          |
>                          |* a view is composed of slots
>                      ____v____
>                     |          |
>                     | ViewSlot |
>                     |__________|
>                          |
>                          |
>                          |* a slot contains a list of viewlets
>                      ____v____        _____________
>                     |         |      |             |
>                     | Viewlet |------| ViewletType |
>                     |_________|*     |_____________|
>                          ^
>                         /_\
>              ____________|____________ 
>             |                         |   
>         ____|____                 ____|____
>        |         |               |         |
>        | Pagelet |               | Portlet |
>        |_________|               |_________|
>
>A view instance is assoziated with one context. A context may be
>viewed 
>with none ore more views.
>
>The distinction between Pagelet and Portlet is still fuzzy. Pagelets
>and 
>portlets are designed to be parts of a view. In that meaning pagelets 
>and portles are equal. They are specialized viewlets. A view is
>composed 
>of viewlets which are related to a specific slot [place] of that view.
>
>But what is the difference between them? The reconstructed
>interpretation 
>of zope's common sense is the following::
>
>    A pagelet of a view displays the underlying context. 
>    A portlet of a view displays data from different contexts.
>
>    Examples: The metadata pagelet displays the metadata of 
>    the underlying context. The metadata portlet displays for 
>    example the metadata of all its children.
>
>    A calendar pagelet displays the calendar data of a content 
>    object that implements an own calendar. A calendar portlet 
>    displays global calendar data on different objects that may 
>    come from an utility for example.
>
>
>In view of the component architecture this differentiation does not
>make
>sense anymore, because the adaption mechanism may hide such criterias 
>(implementation decisions and details) transparently inside an
>adapter.
>
>That is the reason, why we try to provide a new definition::
>
>    A pagelet of a view operates of the underlying context. 
>    A portlet of a view operates of the underlying or a 
>    different context.
>
>    Examples: The metadata pagelet displays the metadata. 
>    Therefore it adapts the underlying context to IMetadata. 
>    The metadata portlet displays metadata too, but it adapts 
>    a context indepentently to the underlying view context.
>
>    Hence serveral pagelets of the same type composed inside 
>    one view must display always the similar content where 
>    several portlets of the same type composed inside a view 
>    can present different contents.
>...
>
>  
>
Hi!

if:

- A pagelet of a view operates of the underlying context. 
- A portlet of a view operates of the underlying or a different context.


then a pagelet is a portlet that uses the underlying context as a 
parameter to do the rendering?

I have a portlet for instance called the Document portlet that displays 
the current document in the context of the current entire page 
(underlying context), but the layout used to display the document is a 
property set in the portlet itself that refers to one of the layouts 
defined in portal_layouts (different context). So the result is a mix of 
both.

I don't feel that the conceptual distinction is worth the trouble 
though. It doesn't add much.

regards /JM





More information about the Zope3-dev mailing list