what is a 'provider' in .net?

  • Thread starter Thread starter Mike P
  • Start date Start date
Can anybody tell me exactly what a provider is? And give an example?

It could mean any number of things in different contexts. What context
are you interested in?

Jon
 
Jon,

I have inherited a project that has a number of classes with names such
as CartProvider, ClientProvider, WebServiceProvider, DataProvider. Does
this help?
 
I have inherited a project that has a number of classes with names such
as CartProvider, ClientProvider, WebServiceProvider, DataProvider. Does
this help?

Right. These will usually be similar to factories - basically they're
likely to give you a way of obtaining a Cart, Client, WebService or
some data, hiding the details of which Cart implementation is used
etc.

Jon
 
The Provider Pattern is based on an OO Design Pattern, called the Factory
Pattern.

Here is an example (mine) of the Simple Factory Pattern.

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!126.entry


As far as the Member Provider goes, basically MS provides an abstract class
to handle logins, password.
They also give you one concrete version, called the SqlMembershipProvider.

The good part is that if you don't like the default provider
(SqlMembership), you can write your own version, inheriting from the
abstract base class called MembershipProvider !
Thus if you already have a place where usernames and passwords are kept, you
don't get screwed out of using all the cool 2.0 login controls.

Sometimes people use the abstract version (MembershipProvider)
interchangably with the concrete version (SqlMembershipProvider).
Thus adding some confusion.

4 guys has good explanations of the Membership Provider and the Provider
Model as well.

At my blog post, find the
Here is another link, discussing the ASP.NET 2.0 Provider Model.
line, and follow the link.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top