The Pattern
The pattern itself is exceedingly simple and is given the name "provider" since it provides the functionality for an API. Defined, a provider is simply a contract between an API and the Business Logic/Data Abstraction Layer.
referenced from : http://msdn.microsoft.com/en-us/library/ms972319.aspx
Factory methods
The abstract base class should support factory methods to create new objects wherever appropriate, for example, CreateUser().
If a feature allows a provider to create a framework object, but does not allow the provider to extend the object, the framework class should be sealed.
Complex objects created by a provider may keep track of the provider that created it, and expose it as a Provider property. This allows users of the feature to determine the provider that owns the data for the object. For example, when a new user is created with the Membership API, it may be useful for the developer to be aware of the provider that data for the object is stored in.
Administration
The object model for ProviderCollection should include APIs to add, remove, and clear the collection and to set parameters of individual providers in the collection.
Every feature that has providers should have a Provider property that returns type ProviderCollection, for example, Membershp.Providers.
Chatboard (0)