[Zope3-dev] Re: Brainstorming page architecture, pagelets, portlets, etc.

Jean-Marc Orliaguet jmo at ita.chalmers.se
Thu Nov 11 18:20:07 EST 2004


Janko Hauser wrote:

>Jean-Marc Orliaguet wrote:
>
>  
>
>>Personally I strictly use no hacks, since most of them are meant to make
>>it possible to use the exact same HTML code in many situations and let
>>the browser handle the negociation/browser detection logic (NS4, IE,
>>text-based browser, hidden boxes, PDA, etc...). The idea is that if you
>>have several layout / page renderers then you can deal with these issues
>>in Zope and not in the browser - which is a cleaner approach.
>>    
>>
>
>Using different templates is a burden for caching. Or you need to change
>urls somehow which is also not perfect. Or do you know another solution?
>Which would be interesting to know of.
>
>__Janko
>
>  
>

Hi!

On the contrary using the same objects in different layouts makes it 
possible to reduce memory usage since the content of the cached objects 
is the same.

It is the renderable content of the layout (the leaves) that are cached 
not the layout itself or the intermediate containers, so it is 
irrelevent which layout renderer is being used. There can be typically 
100 objects in a portal that are cached and invalidated independently of 
the layout / page template. The layout renderer simply aggregates them 
by looking in the cache.

Even the styling is separated from the content and box decorations are 
added on-the-fly so when you move a box from a part of the layout to 
another (or from a layout to another) it will get another style (colors, 
icons) and a new box decoration for the price of a single cache entry.

Layouts can be selected by URL, by setting a cookie, by setting a 
session variable, or by setting attributes locally in folders. But again 
since the layout is not cached, it is not a problem. I'd like to port 
all that to Zope3 but I'll first have to learn how it works.

/JM



More information about the Zope3-dev mailing list