The following is an illustration accompanying an article published by Directions on Microsoft, an independent research firm focused exclusively on Microsoft strategy & technology. Each month we make one or more key articles available to non-subscribers.
ADO.NET 2.0 includes a Provider Factory API that helps developers write application code that works with multiple providers. The diagram on the left shows how an ADO.NET 1.0 application would have to be written to work directly with the appropriate database provider, in this case, the SQL Server provider. If, later on, the developer wanted the application to work with an Oracle database, the code would have to be rewritten to use the Oracle provider instead.
The diagram on the right shows the addition of the Provider Factory. The factory isolates application code from the specific provider being used and makes it easier for the developer to build an application that works, without modification, across multiple database providers.