[Zope3-dev] Local Utility-Service and persistent Utilities
Ulrich Eck
ueck@net-labs.de
Thu, 02 Jan 2003 20:31:44 +0100
At several parts of my work (schedule, workflow) i needed persistent
Utilities
so i decided to start work on them.
Before i can start i need some information about the way it should be done.
General structure:
- A Local-UtilityService that is configured with the Service Manager
- A Component that is added to some package
- This Component is configured with the UtilityService
My Questions:
1. What information is needed to configure a utility-component ?
My Guess:
- providedInterface (the interface the component provides or choosen
TTW)
- utilityName (an optional name)
- componentPath (the path to the utility-component)
so the Configuration key would be a tuple (providedInterface,
utilityName) ??
2. What components can be configured as Utilities ?
When building the Configuration Screens i need to give a choice of
components
that can be configured as Utilities. How do i find out which one are
avaliable ??
afaik there is not common Interface for Utilities.
3. Should there be a possiblity to add persistently added
component-instances as well
as python-based (like global Utilities) ones ??
4. How does resolving Utilities work when they have a name ?
from the sources it seems, that when a utility is provided with name,
it is not
found when one queries only for the interface it provides .. is this
behaviour
correct and wanted ??
5. How is registration/configuration handled when:
- two utilities provide the same interface (no name) --> exclusive
activation.
- two utilities provide same name and interface --> exclusive
activiation.
- one util provides interface - no name, other provides the same
interface with name ?
- two utilities provide different interfaces for the same name ?
I would basically start with adapter-service as template, add specific
configuration-code,
use the ImplementorRegistry (made persistent) to store
Utility-configuration
and build a TTW-Config-screen.
What else should i take care of when start working on this issue ??
thanks for your comments
Ulrich Eck
------------------------------------------------------------------------
net-labs Systemhaus GmbH
Ebersberger Str. 46
85570 Markt Schwaben
fon: +49-8121-4747-11
fax: +49-8121-4747-77
email: ueck@net-labs.de
http://www.net-labs.de