We generally say that such and such framework will allow us to have portability. But how many times does it happen when we really change database? or for that matter our ORM/persistence provider. In my company we use hibernate but still have iBatis for oracle stored procedures.
I've worked on a project where we used MySQL in the development environment and Oracle in production. In another project, the client decided to change from MS-SQL to Oracle.
We change databases all the time. We support a variety of database tyes and versions in production. We also swap to an HSQLDB instance in our unit test run that is created in a known state by our tests. Very useful.
I often see databases change, but you are right, we quite often see the old database persistence mechanism sticking around. DAOs are supposed to make switching implementations easy, but few people actually want to do it.
I think your general tone is probably correct. We do alot to keep our applications and our persistence layer flexible and pluggable, but when so much is at risk, professionals are very hesitant to plug in anything new.
Originally posted by Padmarag Lokhande: We generally say that such and such framework will allow us to have portability. But how many times does it happen when we really change database? or for that matter our ORM/persistence provider. In my company we use hibernate but still have iBatis for oracle stored procedures.
So there is application portability and db portability. I think persistence frameworks are getting good at the application portability.
DB portability is usually harder. I would say though that if you can be like 80%-90% portable, then you are in good shape.
SQL frameworks actually become harder to port because SQL developers get good at writing database tuned SQL (Usually have some DBA do the tuning). A framework like iBatis which externalizes SQL can be good for this.
Roland Barcia: IBM Distinguished Engineer, CTO Mobile for Lab Services
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
Gift giving made easy with the permaculture playing cards