[Zope3-dev] Re: run-time adapter registration and un-registration

Philipp von Weitershausen philipp at weitershausen.de
Tue Feb 13 06:28:58 EST 2007


On 13 Feb 2007, at 12:21 , Stephan Richter wrote:
> On Tuesday 13 February 2007 06:14, Jim Fulton wrote:
>>> Well, we do it all the time with persistent, local components (not
>>> necessarily with adapters but with utilities).
>>
>> The key is that we haven't done it (recently) with adapters, so this
>> is some virgin territory. I believe I've seen a report of a problem
>> with local adapter registrations but it's been lost in my old email.
>> Hopefully, whoever sent me the mail will chime in or, better yet,
>> submit a collector entry.
>
> If I need local adapters these days, I use z3c.baseregistry.  
> Usually adapters
> do not need to be persistent, but just available locally.

z3c.baseregistry is still a volatile registry, thus should be  
populated at bootstrapping time, not at runtime, since all changes  
would be lost after a restart.

> That approach has
> worked great for my project and we have started developing other  
> high-level
> APIs on top of that (a plugin system for example).
>
> So to get back to Chris' original question: We configure the  
> plugins via the
> Web, but all the code and configuration is done on the filesystem.

Interesting. plone.portlets actually uses the Component Architecture  
and a persistent registry as the underlying "plugin system", it just  
provides a fancy UI on top of this to manipulate the registry. I  
think that works out well.

I'm not quite convinced high-level APIs, or any other API, is needed  
at this point. While z3c.baseregistry is great, I think there's  
definitely room for local, persistent registries.



More information about the Zope3-dev mailing list