[Zope3-dev] Redundant ZCML directives
Jim Fulton
jim at zope.com
Thu Jul 8 12:46:27 EDT 2004
Philipp von Weitershausen wrote:
> Hello there,
>
> I've found that the
>
> - browser:layer and
> - browser:skin
>
> directives are totally equivalent to
>
> - zope:layer and
> - zope:skin.
>
> Their directive schemas are absolutely equivalent and their handlers are
> even the same! This is an unnecessary redundancy and contradicts the
> rule that there should only be one obvious way to do things.
Yes, but see:
http://dev.zope.org/Zope3/ImplementViewsAsAdapters
Spcifically, note that layers and skins will become request-type specific,
so we will be getting rid of the zope:layer and zope:skin directives.
> Though only being used for browser views, the layer and skin
> functionality is a feature of the presentation service and thus
> available to all view types. So, because they are not browser specific,
> I propose to remove the browser:* directives and keep the zope:* ones.
> Incidentally, we're only using the browser:* ones in our ZCML code, so
> these places would have to be fixed up as well.
>
> If noone objects, I'll make that change to the trunk and X3.0 branch
> tonight.
I object. :)
I suggest you remove zope:layer and zope:skin instead. This will
avoid the backward compat problem when we implement
ImplementViewsAsAdapters.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list