[Zope] Product seeking products: how?

Florent Guillaume fg@nuxeo.com
Thu, 6 Jun 2002 16:28:43 +0000 (UTC)


ZCatalog does that to find all PluggableIndexes.
See lib/python/Products/ZCatalog/ZCatalog.py:addIndex

        products = ObjectManager.all_meta_types(self, interfaces=(
            PluggableIndexInterface,))


Florent

Terry Hancock  <hancock@anansispaceworks.com> wrote:
> Hi all,
> 
> I need to create a plugin architecture for a product I'm
> developing, since I want to encourage third-party
> contributions, and define a clean way for them to work
> together.
> 
> Given that Zope already has a nice plugin architecture,
> AKA Products, it seems like the most logical solution is
> to use that.  
> 
> Thus, my plugins would just be Zope products which
> implement a certain interface.
> 
> But it is unclear to me how best to go about finding
> them. It seems like the most plug-n-play way for this
> to work would be for my product to collect all the
> plugins when Zope restarts -- but there are some
> problems, such as how to run code after all the other
> products have loaded.
> 
> Is there any example code I should be looking at
> to do this (i.e. other products that behave like this)?
> 
> Thanks,
> Terry
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com