[z3-five] Question about skins usage

Philipp von Weitershausen philipp at weitershausen.de
Wed Jul 26 01:25:05 CEST 2006


Tres Seaver wrote:
> Paul Winkler wrote:
>>> On Tue, Jul 25, 2006 at 01:47:16PM +0200, Philipp von Weitershausen wrote:
>>>> Why? The one-layer-per-product rule from the CMF is pretty stupid.
>>> Which rule is that? My old CMF code frequently used multiple layers.
> 
> Hmmm, maybe Philipp doesn't really believe in layers?  The original
> point of layering was to allow reuse-with-override;  later, the layers
> became a way to organize "related" skin objects on disk.  If you aren't
> trying for those goals, then layers are definitely overhead you don't need.

I do like layers. What I don't like is a common pattern in CMF, or
rather, in extension products for the CMF which makes up for the missing
"default" layer in the CMF.

Say you have a blog product for the CMF, and blog objects have an edit
form (blog_edit_form) and a display page (blog_view). These views are
typically on the filesystem. Now the product wants to get them into the
CMF. The only way to sanely do that is to put them into a directory,
register that directory as a layer in the skins tool AND (this is the
wicked part) modify all skins to include this layer.

I don't think layers were made for that. There's no reason for these
standard (!) object views to be on a special layer that you can switch
on or off, that your skin can decide to include or not. They should just
be "there". That's why we have the "default" layer in Zope 3.

I find layers useful, but only in one context: producing skins. The
"default" layer has no skinning, that's what specialized layers are for.
I'd say 99% of the things I would put on a layer other than the default
one is skin-related (skin macro, resources like logo images, CSS,
JavaScript, etc.).

Philipp



More information about the z3-five mailing list