advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
CoDe Magazine
Subscribe to CoDe Magazine
 

Insulate Your Code with the Provider Model

Find out how to protect your code from changes by taking advantage of the Provider Model, which lets you swap components at run time. 


advertisement
evelopers constantly face problems brought on by changing technologies. When Microsoft releases a new version of a data provider, or a customer decides to switch databases from Oracle to SQL Server, you may have to rework code you've already written. But you can avoid much of this rework if you take the time to plan and code for such changes. One recommended way to do this is to develop components that take advantage of the Provider Model.


A provider is a class or a component that provides specific functionality to an application. However, the Provider class used will not be known until run time. In this article, you will see how to create a data provider that lets you change from using SQL Server to a generic OLE DB provider with no code changes! You will just have to change a setting in a configuration file. Using the Provider Model gives you a great amount of flexibility and upgradeability to your source code.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



© Copyright Component Developer Magazine and EPS Software Corp., 2009
advertisement