[Zope3-dev] RFC: Local Component Management Simplification

Martijn Faassen faassen at infrae.com
Thu Feb 2 11:50:34 EST 2006

Jim Fulton wrote:
> I've posted a proposal to simplify local component management at:
>   http://dev.zope.org/Zope3/LocalComponentManagementSimplification
> Comments and questions are welcome.

I like the proposal.

I'm trying to figure out what this means exactly:

Registries may place restrictions on objects registered. In particular, 
local registries stored in the ZODB will have to be able to store 
registered objects (or references to registered objects) in the ZODB.

So, this means that for a ComponentRegistry that's in the ZODB 
(non-global), the utility you want to register needs to be pickleable, 
or 'referenceable'. How would such a reference to a registered object 
that's not in the ZODB work?

Related to this, I'm looking for a new (the horror!) ZCML knob which 
would allow me to say:

For this content object (that is a site), when it's installed into the 
ZODB (like a CMFSite or a Silva Root), please also install the following 
local utilities (catalog, intid utility, etc).

Here's an idea that I haven't really thought through:


this would set up somekind of subscriber for IMySite so that whenever an 
  object providing IMySite is added to a container, a local utility of 
type mycatalog.Catalog would be set up in it straight away.

The component registration interface as proposed would help some setup 
code cleaner, but having such functionality in ZCML would clean up quite 
a bit more registration code -- right now we have an event handler that 
gets called when a site is added, and then calls a lot of Python code to 
do the utility setup. It's lots of code that is really doing 
configuration expressed as Python.

(Of course in case of a catalog this sort of begs the question whether 
setting up catalog indexes should be configurable through ZCML too...)



More information about the Zope3-dev mailing list