[Zope3-dev] Allowing views to be registered for classes rather than interfaces.

Stephan Richter stephan.richter@tufts.edu
Tue, 15 Jul 2003 11:24:23 -0400


On Tuesday 15 July 2003 08:07, Martijn Faassen wrote:
> The point about the interface hierarchy is to allow multiple
> implementations of the same interface. Are the schemas described here
> designed with this in mind? Or does one really only ever expect a single
> implementation?

That depends on what I am working on. Here I guess I meant that we only have 
one implementation (which most interfaces will).

BTW, I already implemented a couple of interfaces or a second time in an add-
on product. I wrote a Lucene-based Text Index (will be released soon; 
struktur - who sponsored it - wants to make some tests first), which 
implemented a bunch of the regular text index interfaces.

so in the configuration I have 

  <require
      permission="zope.ManageServices"
      interface="zope.app.interfaces.index.text.IUITextIndex"
      attributes="query" />

and I really did not care if it would have been 

  <require
      permission="zope.ManageServices"
      interface="zope.app.index.text.interfaces.IUITextIndex"
      attributes="query" />

In fact, the latter makes more sense to me. I really do understand your point, 
but I have yet to see a good use case for it.

If the interface hierarchy would deviate much more from the implementation 
hierarchy, I would say you have a point. But it does not. In fact I would 
claim they are to 95% exactely the same, which makes it all just confusing.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training