Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Context Provider vs. Context Factory


My concern with using the term "factory" is that the functionality associated with the IContextProvider interface (in the working draft: http://spwiki.editme.com/files/IdentityAttributeService/idas-methods-0707.doc) is larger than what I generally associate with a factory.

(1) The open method evaluates the policy of the named Context against the supplied DigitalIdentity. (Is this correct? When Tom posited that "the Context Factory does not concern itself with the evaluation nor enforcement of policy," Paul agreed.)

(2) The getContexts (or getOpenContexts) method implies that a factory keeps track of the Contexts that it has created, or can create, or for which it is somehow responsible. Most factory classes that I'm familiar with simply create the object and hand it over.

(3) The closeContext method again implies some further connection with the Context after its creation.


So I've reverted back to using ContextProvider to refer to this entity, because it seems like more than a factory. The problem is that "provider" is a loaded term that is generally associated with packaging/deployment.
I propose that we do one of the following:

(a) Keep the current assignment of duties of the current IContextProvider but rename it to something that conveys more than object creation, e.g., IContextManager.

(b) Refactor the functionality of IContextProvider into creation (IContextFactory), access (IContext), and management (registry) of contexts. (Where does the resolution of a ContextRef to a Context object happen? Factory? Static method of Context class?)

I further propose that there is no need to include the "provider" notion (in the sense of packaging/deployment) in the API. The factory/manager object has metadata that can be used to convey vendor, data formats, etc. There will be different Registry implementations for different platforms, and each implementation must specify the process for registering and incorporating new types of factory/manager.

...Greg



Back to the top