Chris Withers wrote:
> 
> Hi All,
> 
> I find myself often having to define pure marker interfaces for each 
> class that I define, purely so I can register adapters for objects of 
> that class.
> 

Why does your class not have a (non-marker) interface in the first place?
The use of interfaces as documentation and as formalisms for expressing a
class' functionality (in adapters, utilities etc) is one of the benefits
that Zope 3 introduces. I can see how they may not always add that much
value immediately, but they are a good way of ensuring things are reasonably
well-defined, well-documented and easily locatable. I'd rather start from
interface design and implement as necessary, than think of interfaces as
necessary evils of the CA, personally.

Martin
-- 
View this message in context: 
http://www.nabble.com/adaptation-based-on-class-rather-than-interface-tf2601087.html#a7257399
Sent from the Zope3 - dev mailing list archive at Nabble.com.

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to