What is a .Net 'provider'?

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hi

I've been able to make data driven applications for some time now. I've made
them using Java/JDBC and C#/ADO.net.

I was just thinking though - I hear the term 'data provider' quite
frequently, but I'm not sure what exactly a 'provider' is.

Is it like a driver to a *particular* database? For example an Oracle driver
could also be called an Oracle data provider?

Or is it something else? The only literature I've been able to find is a bit
confusing because none of it deals with what a provider is particularly. It
all just makes passing references to providers.

This isn't particularly important, but I was just curious for a simple
definition.

Thanks anyone who can help

simon
 
Hi Simon,

For me the provider is a class (or set of classes or assembly) the
provide(s) data to .net world.
If Oracle driver contains managed provider then it contains a .net provider.
Of course, there could be a better definition :)
 
Simon,

I think the two phrases are often confused because from the .NET
perspective, the provider is the window (the class that accesses) the
driver. Any weirdnesses of the driver are hidden by the provider, which is
the last layer between your .NET code and the plumbing that accesses the
data. How many layers of plumbing lie behind that is managed by the driver
and you can ignore when using the provider.

This is pretty much what Miha said, but I thought if you were looking for
nuances in meaning here two perspectives might be helpful.

Kathleen
 
Thanks guys,

Just to be sure that I understand (or not!):

Would I be correct in saying that a provider is a class that makes calls to
a driver?

I am trying to conceptulise whats going on here using a layer diagram I
remember from university. It went something like:

Layer 1 : Java Application Code - written by me. Specific to my application
Layer 2 : JDBC: Written by Sun
Layer 3 : A Specific Driver: Written by a Sun, or a third party

Now having heard your explanations I'm thinking along the lines of:

Layer 1 : .Net Application Code: Specific to my application
Layer 2 : A Managed Provider
Layer 3: A Specific Driver

Is that accurate-ish?

I own Visual Studio.net 2002 and I've used it to get data from SQL Server
and also Access. Depending on the database I wanted to access, I had to use
the Namespaces:

System.Data.SQLClient - SQL Server
System.Data.OleDb

Are the classes contained in these namespaces, 'managed providers'? Or have
I lost the plot.

I appreciate your help. Remember though that this isn't a very important
problem. I'm just curious really

Thanks again

Simon
 
Hi Simon,

Simon Harvey said:
Thanks guys,

Just to be sure that I understand (or not!):

Would I be correct in saying that a provider is a class that makes calls to
a driver?

I am trying to conceptulise whats going on here using a layer diagram I
remember from university. It went something like:

Layer 1 : Java Application Code - written by me. Specific to my application
Layer 2 : JDBC: Written by Sun
Layer 3 : A Specific Driver: Written by a Sun, or a third party

Now having heard your explanations I'm thinking along the lines of:

Layer 1 : .Net Application Code: Specific to my application
Layer 2 : A Managed Provider
Layer 3: A Specific Driver
Is that accurate-ish?

Yes, that's pretty correct IMHO. Note that 3 is not obligatory (managed
provider could speak directly to server).
I own Visual Studio.net 2002 and I've used it to get data from SQL Server
and also Access. Depending on the database I wanted to access, I had to use
the Namespaces:

System.Data.SQLClient - SQL Server
System.Data.OleDb

Are the classes contained in these namespaces, 'managed providers'? Or have
I lost the plot.

You are right.
I appreciate your help. Remember though that this isn't a very important
problem. I'm just curious really

Curiosity drives the good programers :)
 
Simon,

What Miha said <g>...

Yes, you've got it. From an OOP perspective, everything behind the Provider
is a black box. You don't care how the Provider splits up the work, which is
why it wasn't really incorrect for you to perceive it as a driver - it
accomplishes the task of the driver.

Why haven't you upgraded to VS.NET 2003? I am just curious.

Curiousity only kills cats, not programmers.

Kathleen
 
Hi Simon

The terminology changed over time.

A driver was used by ODBC.
The OLEDB equivalent of a driver was called a provider, I really don't know
why.
What you have in .Net is more properly called a Managed Provider. A managed
provider is one that plays well with .Net Memory management, so it can be
garbage collected, etc.

But you guys are right, they all do the same thing. But if you refer to an
"Oledb driver" or a ODBC driver as a provider, the other programmers will
make fun of you and take your lunch money. :-)

Thanks,

Russ Gray
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Why haven't you upgraded to VS.NET 2003? I am just curious.

I'm afraid I would have but it would mean i would have to buy the academic
license again.
I'm a student and as I understand it, the academic version wasn't eligible
for the $29 upgrade. If I wanted to 'upgrade', I would have to buy a whole
new license. Admitedly the academic license is cheap, but when you have an
income of zero the word 'cheap' is relative.

I was pretty annoyed at Microsoft for that. I was one of the first people I
know of to get Visual Studio 2002. Yet in a very short space of time, I
couldnt open newer Projects and Solutions written in the 2003 edition even
though there is hardly any difference between the two editions.

I know my complaint doesnt apply to the majority of people as they were all
eligible for the upgrade. But I had to save up for the license and to have
it made obsolete so quickly, with no upgrade path really yanked my crank.
For want of a better phrase.

If I ever have money again I'll upgrade, but that doesnt look like its going
to be for a while! :-(

Thanks for your advice guys. Much appreciated

Simon
 
But if you refer to an"Oledb driver" or a ODBC driver as a provider, the
other programmers will
make fun of you and take your lunch money. :-)

Aww man! I still have nightmares about the university "Initiation Shower". I
couldn't sit down for a fortnight!

Thanks for your help Russ

Simon
 
Back
Top