[Zope3-dev] 'layer' vs. 'type'

Gustavo Niemeyer gustavo at niemeyer.net
Fri Sep 15 12:14:36 EDT 2006


Hello everyone,

I was just implementing a ZCML statement for a view-related
component which should also take in consideration request
interfaces for adaptation.

After reading the "SimplifySkinning" proposal form Philipp, I'm
somewhat unsure about how to define the request type in the ZCML
directive in a way similar to what developers would expect in
standard directives.

I've seen in the code base and also in Philipp's proposal that the
renaming of 'layer' to 'type' isn't complete yet, so I'd like to
ask: does it really make sense?

Consider something like the following:

  <browser:something type=".ISomeInterface" />

I read this as "the type of something is ISomeInterface" rather
than "something is used with ISomeInterface requests".

Let's take a more concrete example: IMenuItemsDirective. It's one of
the many directives with a 'layer' field.  If renamed to 'type',
wouldn't that clash with the concept of MenuItemTypes?

With this in mind I propose to either keep this argument as 'layer',
or use a term that better represent the relation with request types,
answering the question "type of what?".

What do you think?

-- 
Gustavo Niemeyer
http://niemeyer.net


More information about the Zope3-dev mailing list