Daniel Rohe said:
Hibernate is not the de facto standard!
No, certainly not. The field is very open. Hibernate is far more
popular than anything similar that's out there, but I suspect many times
as much code is written in plain JDBC as that written for Hibernate.
If you want to be independent from the persistence mechanism you have to
implement a DAO layer, which abstracts from the persistence mechanism. With
this layer your application can use any possible persistence mechanism which
is on the market.
I disagree with this advice. Unless your application's persistence
requirements are trivial, it will be nearly impossible to design an
abstract persistence layer that can be implemented interchangably using
something as distinct as, say, Hibernate versus JDO. The basics may fit
together, but the differences in transaction semantics and the like will
kill you. You either:
1) End up effectively committing yourself to one product anyway; except
you don't know it.
or 2) Commit yourself to developing in such a horrid distortion of Java
that you've lost the very thing that makes O/R mapping popular anyway.
Either way, you've put in a substantial portion of the work you would
have needed to roll your own persistence anyway, you've created a large
body of code to maintain (and since the code is dependent on the
external interfaces of potentially several products, it will change MORE
than the simpler code), and you've opened up the possibility of who
knows what subtle bugs in the future.
Nah. Better to just pick a product and write to it. If you change your
mind later, do the port then.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation