[Zope3-dev] Re: Page Architecture: Term suggestions
Dominik Huber
dominik.huber at projekt01.ch
Sat Dec 4 09:00:53 EST 2004
>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.
...
More information about the Zope3-dev
mailing list