[Zope3-dev] RFC: splitting up the default layer
Dominik Huber
dominik.huber at projekt01.ch
Wed Feb 23 15:36:46 EST 2005
Garrett Smith wrote:
>Because the default layer is optional, it's possible to create skins
>that exclude *all* of the default Zope components. This is essential for
>creating ZMI-free applications.
>
>However, there are a number of vital registrations in the default layer
>that have to be duplicated for a skin to be usable. These include
>traversers, namespaces and widgets.
>
>I propose that we split the default layer into the following layers:
>
> zope_core - Core registrations such as traversers
> zope_widget - Widgets defined in z/a/form/browser
> zope_namespace - Core zope namespaces such as skin, resource, etc
> zope_browser - Existing Zope pages (generally ZMI related)
>
>(There may be other layers here, or a better organization.)
>
>The obvious problem here is the increase in complexity. We've already
>seen posts about layer/skin confusion.
>
>I was initially tempted to prospose a 'zope_all' layer, which combined
>all of the zope_xxx layers. But this is really what a skin is for.
>
>I think (not possitive though) that the right approach is to do away
>with the notion of a 'default layer' entirely -> The only thing that's
>default is a skin. The default skin would contain all of the current
>default layer registrations by explicitly listing the zope_xxx layers.
>
>Skins like Rotterdam would be define their components in their own layer
>to keep the zope_xxx clean (not enforced, but best practice). A skin
>that wanted the equivalent of today's 'default' layer would just
>subclass the default skin.
>
>I believe this proposal works because skins and layers essentially the
>same thing. This is just organizing the concepts to make the
>layering/skin system more usable.
>
>Thoughts?
>
>
+1
we already use such a pattern for our customer project where we have to
provide two skins, an administration skin deriving from the default
layer and a public skin deriving from a minimal layer which covers your
zope_core and zope_namespace.
regards,
Dominik Huber
More information about the Zope3-dev
mailing list