[Zope3-dev] Re: adaptation based on class rather than interface

Lennart Regebro regebro at gmail.com
Tue Nov 14 10:13:28 EST 2006


On 11/13/06, Jean-Marc Orliaguet <jmo at ita.chalmers.se> wrote:
> yes, but if you register an adapter for a base class you don't have to
> register it for subclasses, do you?

I don't know, but again you then need to either subclass or
re-register for that calss, but if you register it for an interface,
you can eiterh subclass or implement the interface.

> subclasses will pick up the same adapter. Provided that you use classes
> for typing your objects and not interfaces.

Class and interfaces do different kinds of "typing". You do both, normally.

> > I'm not sure the proliferication (?) of marker interfaces is a big
> > risk. But if we get many of them, it still works better than the
> > options of magic __something__ attributes. :)
>
> but conceptually it is the same mess :-) i.e. a total lack of
> specification.

I don't agree with that at all.

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.nuxeo.org/


More information about the Zope3-dev mailing list