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

Martijn Faassen faassen@vet.uu.nl
Fri, 18 Jul 2003 18:49:42 +0200


Jim Fulton wrote:
> >I don't care what the class-advice function is called.
> 
> I don't think Garrett was compaining about the name, but about
> the concept.  I too find the concept more complicated that I think
> is justified by the benefit.  Personally, I'd much rather either
> create an explicit placeholder interface or just register against
> the class directly.

Okay, asking some questions. Perhaps they're wrong, but I'm just
throwing them out.

Wouldn't this be too implicit if you can just register against any class
directly? At least with this proposal you have to *say* something to 
make the class useable that way.

Wouldn't it be rather complicated to make the interface registries
and lookup code now also work with classes? Code that just uses
interfaces sounds easier to optimize too.

Wouldn't it be conceptually confusing -- won't people wonder what the
difference is between a class and an interface even more? With this
proposal people still deal with interfaces and interfaces only.

How do you use schema with views against classes?

Wouldn't the introspection code become more complicated
if it is now possible to define views against classes?

Steve mentioned some issues with explicit placeholder interfaces which
don't specify all the methods. I may have misunderstood them, but 
isn't that a problem with using placeholder interfaces? It'll also
be harder to distinguish these from real marker interfaces.

Regards,

Martijn