March 18, 2006

Hibernate Thoughts


Frankly a problem for me is that chasing Hibernate around is kind of scary.  I understand (as just one example) that Hibernate 3 does not return objects that satisfy "InstanceOf" - it uses cglib and as such while the methods all work just peachy these are no longer even fake versions of the POJOs that they claim to represent.  Sheesh.

Does this mean that we re-do all of our abstractions again when we switch to Hibernate 3?  The whole idea of abstractions is to hide implementations - not to make the implementations using one particular technology easy.    

To me there is a difference between an Abstraction and a DAO.    A DAO is a utility which is used *within* the implementation of an interface.  Some of the underlying semantics of the technology which implements a DAO bleed through the DAO because the DAO needs to be fast and efficient and the DAO is consumed in a few places.  But an abstraction is intended to be consumed at a distance between parties who get the contract, and then walk away and write code and expect the cood to work together for a long time without renegotiating the contract.

Posted by csev at March 18, 2006 03:03 AM