[Zope3-dev] RFC: splitting up the default layer

Garrett Smith garrett at mojave-corp.com
Wed Feb 23 12:58:02 EST 2005


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?

 -- Garrett


More information about the Zope3-dev mailing list