[z3-five] Question about skins usage

Tres Seaver tseaver at palladion.com
Wed Jul 26 03:08:01 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Philipp von Weitershausen wrote:
> 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.

Its absence is *by design* (see below).

> 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.

That makes the product harder to reuse, as the "policy" choices are
embedded in the product.  (We don't yet have a reasonable way to include
only part of an add-on's configuration in ZCML, or to disable part of it
after inclusion).  Layering in the CMF means that including skin methods
("views") from an add-on product is an explicit choice, with per-layer
granularity.  In Zope3, the granularity tneds to be "per add-on", as
many add-ons have *all* their configuratoin lumped together.

> 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.).

I don't think we have enough experience in the Zope3 world with
combining large numbers of third-party products, and tweaking the
resulting highly-complex configuration, to claim that Zope3's model is
intrinsically superior to the one evolved for Zope2 + CMF.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFExsBw+gerLs4ltQ4RAg7PAJ0emp8WaUZDSs7WBJO37OU0urecfQCgn/ul
2iyRxoQ2kFMA1rLR0kAK1Is=
=jSHA
-----END PGP SIGNATURE-----



More information about the z3-five mailing list