[Zope3-dev] Portlets vs Pagelets
Jean-Marc Orliaguet
jmo at ita.chalmers.se
Mon Dec 6 16:16:20 EST 2004
Jim Fulton wrote:
> Garrett Smith wrote:
>
>> Jim Fulton wrote:
>>
>>> I'd like to suggest a more important distinction between
>>> portlets and pagelets. Portlets are largely under the user's
>>> control. User's can choose, configure and arrange portlets for
>>> themselves. As a result, the system has to track portlet information
>>> by user, as well as default portlet information.
>>>
>>> I suggest that pagelets are components used by the page author to
>>> construct pages. To tie the two together, a portlet slot might be
>>> implemented as a pagelet.
>>>
>>> I suggest that the most important goal of a pagelet framework
>>> is to provide a framework for page construction, including management
>>> of shared resources and resource dependencies.
>>
>>
>>
>> This is helpful.
>>
>> To reiterate my earlier observation, we already have a number of
>> page-construction facilities/patterns. What are the major problems with
>> the current system that need to be addressed?
>
>
> How do the current patterns deal with shared resources?
>
> For example, if we have five widgets that all share the same
> javascript code, we'll get 5 copies of that code. It's
> even worse for pagelets with needed visable resources like
> tool bars.
>
Hi,
Indeed, how can a page template know how many widgets it contains for
instance? especially if it define slots? Page templates are OK for web
designers who read the code, but apart from that they have no knowledge
about objects around them, neither "before" or "after" logically speaking.
This shows the need to move away from page templates to handle the logic
and treat this inside python classes using real zope objects, schemas,
layouts, widgets, etc. In CPSPortlets the javascript code is only shown
once per page even if several portlets use the same code, and not shown
at all if no portlet uses javascript code, but the logic is done way
before the page is displayed and it is done in python.
The current pattern is: page template calls python. turn it around, i.e.
python calls page templates.
regards /JM
More information about the Zope3-dev
mailing list