Stephan Richter wrote:
> On Wednesday 07 December 2005 16:33, Dominik Huber wrote:
> > Phillip's Proposal:
> > Furthermore, I propose to remove the |IDefaultLayer| interface. We've
> > been using the |default| layer as a connotation of "always being
> > available unless overridden by a more specific layer." However, this
> > does not apply all the time: When the |default| layer is not included in
> > a specific skin, nothing from the |default| layer will be found even
> > though the ZCML statements suggest that it would always be available. I
> > therefore propose to make the |default| skin layer an alias for
> > |IBrowserRequest|. Anything registered for |default| will obviously
> > always be available then, no matter what your skin layer looks like.
>
> Oops, I missed that part. -1 on it, like Dominik. I originally did not have an
> IDefaultLayer when I converted views to adapters and it caused a lot of
> headaches for people. It was thus added and we all agreed it was needed.

Very well, I wasn't aware of the fact that it was commonly undestood that 
IDefaultLayer
was needed. The original proposal 
(http://dev.zope.org/Zope3/ImplementViewsAsAdapters)
certainly doesn't mention it. I've now found the relevant check-in where it was
introduced 
(http://mail.zope.org/pipermail/zope3-checkins/2004-November/023621.html). The
benefits are stated there, but the actual reasoning is in CHANGES.txt where it 
says
"[IDefaultLayer] allows developers to create skins that do not include the 
default
layer." I guess the proposal should have been updated with this info and a 
sentence
saying that there actually *are* developers with the use case of creating skins 
sans
default layer. At least it would have made things clearer to me from the 
beginning ;).

Anyways, I overhauled the proposal now to include lots of useful suggestions 
from you,
Martijn, and Dominik. Thanks for the input so far, please revise it and let me 
know if
you see any other issues.

> Your connotation assertion here is incorrect. The default layer stands for:
> "If the browser directive did not specify a layer, use the default layer." By
> default, the Basic and thus Rotterdam skin incorporate that layer, but others
> like Dominik and Garrett do not want to include that layer.

Right. I wonder if we should make the 'layer' argument mandatory then. Right 
now we have
the connotation "You can leave the layer argument out in which case Zope will 
use some
arbitrary layer that might or might not be in your skins and is boldly called 
'default'."

Philipp

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to