[Zope] re: Meta Type Registry

Chris Withers chrisw@nipltd.com
Mon, 24 Jul 2000 10:48:38 +0100


Andrew Kenneth Milton wrote:
> What about code like this ? While this one is explicitly searching for
> sub objects, I have code that searches the acquisition path for
> known meta_types, if someone else has a product with a meta_type I think
> is mine, then bad things can happen... Cataloging also might cause an issue.

This looks like a pretty nasty can of worms...

I like the idea of a meta_type registry on zope.org just as a guide. It
shouldn't be too hard to set up.

However, I think Zope(and its peripheries) need to handle this in some
more defined and 'safe' way. I know I've written code like AKM's many a
time and now I'm not confident it will work :(

Perhaps a combined meta_type and product name to serve as the 'unique
meta_type' is called for? Mayeb this could replace meta_type all
together?

Another thing I've wondered about is 'inherited' meta_types. Subclassing
is easy in Zope and python which is cool, but the OO nature is currently
hard to exploit when it comes to meta_type. When I say 'find me all
ZCatalogs', I might well want to include anything the subclasses
ZCatalog as well, like Squishdot and ZDiscussions for example.

I wonder how this could be implemented? I wonder how python handles this
with the __class__ attribute or something similar?

cheers,

Chris