[Zope3-dev] Re: browser:page (was re: scripter/designer concerns)

Garrett Smith garrett at mojave-corp.com
Wed Sep 10 12:18:25 EDT 2003


Jeffrey P Shell wrote:

  > I also noticed that <browser:page> is being used to assign new 
traversal
> objects, with a name of "_traverse".  That also seems to go against some 
> of what I expected of Zope 3 - less magic names.  Shouldn't that be 
> registering a view/adapter for some IBrowserTraversal interface instead 
> of registering a 'page' for '_traverse'?

This is a good question -- IIRC, Shane once deemed the '_traverse' 
convention a wart.

I'm not terribly bothered by it, but I would like to hear from others as 
to what the correct approach is. I occasionally need to get a view of a 
specific type for a context, and I'm currently using a naming convention 
ala '_traverse'. I currently feel no guilt, but at some point I'd like 
to clean things up.

It seems to me that neither views nor adapters will work. Views are 
accessed by name (I want to access by interface), and adapters expect a 
single argument to their constructor (views require two: context and 
request).

This seems like a pretty substantial hole, or am I missing something?

  -- Garrett





More information about the Zope3-dev mailing list