[Zope-dev] View component registration

Jim Fulton jim at zope.com
Wed Jun 18 17:52:17 EDT 2008


On Jun 18, 2008, at 4:31 PM, Malthe Borch wrote:

> Currently views are registered as components providing  
> zope.interface.Interface; this is unfortunate since other kinds of  
> components may use the same specification, namely (context, request).

Right. This is a historical accident that I would love to see  
corrected.  It's just never been a high enough priority.

...

Note that resources have the same problem.

> I suggest we then register views as components providing  
> ``zope.component.IView``; browser views should provide  
> ``zope.publisher.interfaces.browser.IBrowserView``.


zope.component isn't the right place.  What's more, "View" isn't the  
right word.

I think this needs more thought, but I think that:

- the interface is about publication (not components or views)

- the interface is for objects that want to be published, regardless  
of whether they are adapters.

Basically, when you get to the end of URL traversal, you should get an  
object that wants to be called to get a result and that implements or  
can be adapted to this interface.

Jim

--
Jim Fulton
Zope Corporation




More information about the Zope-Dev mailing list