[Zope-dev] Re: View component registration

Philipp von Weitershausen philipp at weitershausen.de
Wed Jun 18 22:24:43 EDT 2008


Jim Fulton wrote:
> 
> 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.

Right. I think zope.publisher.interface.browser.IBrowserPage already 
fits this description, but feel free to correct me if I'm wrong.



More information about the Zope-Dev mailing list