> The whole 'changing the data store' gets me. I hear it a lot from OR mapping people. > How often are you realistically going to do this? Is it really worth the effort? > Bearing in mind switching enterprise class databases is a costly and time-consuming > affair even when you don't take into account redevelopment of code.
I fully expect to do it zero times while at my current company. There could, however, be the case of us writing code that will get used by our affiliates who have say Oracle and not SQL Server. In that instance, it would be good to have your data layer separate enough that you know you only have [x] number of places to go to change things. Or, in my instance, where my company is owned by a MUCH larger company and they could easily politically dictate that we standardize on another RDBMS and ditch SQL Server. > Of course I can't answer in anyone's individual case, but it often seems > like overengineering to me. I'm with XPers on this - I can't remember their phrase > for it, but it is along the lines of don't do it unless you have to. I completely agree with you. Don't do it unless you have to, however design it in such a way that it won't kill you to change things if they eventually need to. That's really the use of your data layer (don't let biz objects handle anything DB-related), mine is just more abstraction put on top of it (it takes me 2 minutes to create a complete data class using the wizards I built, hence it doesn't slow me down at all). Adam.. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.