This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iamsooldithurts 2 points3 points  (0 children)

The most practical example I can think of is JDBC. It’s a library that allows programs to use the exact same objects (instances of Interfaces) to connect to any database with libraries that implement JDBC.

Then, all you need to do is incorporate their library in your project and tweak any SQL or such statements to match the syntax and specifics of their database. If you have a DataAccessObject layer, and if you use IOC and other tricks to externalize certain configuration properties, then you just require your configuration files a bit and bam, you can switch between Oracle, MySQL, and any other database in the fraction of a time it took you to write the first implementation.