"imagine if your database application could switch from using foxpro tables, to microsoft sql server, mysql, or to postgresql, by simply changing one line in a configuration file? imagine further if this change could occur programmatically at run time, without having to write different code to handle each different back-end separately?"
the teaser text above drove me directly to steve ellenoff's session - creating database abstraction classes in vfp: switch your back-end with ease. my experience with databases is is really restrict, and i wanted to hear from an expert about the best techniques to work in different scenarios.
steve showed how he created his "data related abstraction class" - dac, that allows his application to switch from:
- foxpro data to any remote sql server back-end easily.
- any remote sql server back-end to foxpro data easily.
- any remote sql server back-end to any other remote sql server easily.
the application could make this switch at development time or run time, even programmatically, without:
that's pretty cool! he showed us how these classes can create automatically the "select" statements to access vfp, sql server, mysql or postgree data automatically. it was really very good to see step by step how these classes do the job.
of course there are lots of differences between the databases, the field types, the access, the instructions, the language, etc. really impressive to see how he made something really complicated from my point of view to look so accessible. he provided his classes and many samples for me to start with, all super well documented in his 86 pages whitepaper! below is a diagram taken from the whitepaper that summarizes all of that:
thanks a lot steve, your session was great, and very helpful.