epesh
I'm Joseph Ottinger, editor of TheServerSide.com.

Calendar

««Nov 2009»»
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

My Bookmarks

My Top Tags

                                       

Mailing List

My RSS Feeds








Search Box

 

The "transparent" persistence mechanism

posted Thursday, 29 July 2004
I've been playing with Hibernate a good bit lately. I know a lot of people who are very high on it, and it's probably the leading persistence mechanism being talked about, although I don't know what persistence mechanisms are actually most popular in extant code. It'd be interesting to have a valid survey on the subject - blog polls don't quite count.

Thankfully, Hibernate doesn't say that it's transparent persistence for Java. It isn't. In a few sample programs I threw together to familiarize myself with some fairly trivial operations, I have about equal amounts of code dedicated to configuration, instantiation of hibernate processes, exception handling... with just a touch of code actually dedicated to the object model that all this stuff is supposed to manipulate. My impression had been that hibernate did bill itself as transparent, but thankfully that was a figment of my imagination - they don't make the claim.

I am not unimpressed with hibernate, in all honesty, although I keep thinking it's just another way - not necessarily a better way. (I prefer more straightforward DAOs, myself, despite my own product having some fairly obvious bugs in the caching mechanism, since fixed.) Hibernate's a lot less intrusive than, say, CMP is, and it has features CMP doesn't (dates being usable in queries, for example, and far more flexibility in set relationships). I also like the configuration files, if not the mechanism so much.

What bothers me is still the developer focus, though - hibernate programs tend to ignore the developer/deployer relationship, from what I've seen, in that they encourage the developer to make decisions about deployment that he/she would be better off leaving up to the deployer.

I also wonder about the extra classloader - maybe it's my lack of hibernate architecture knowledge speaking here, though. My concern is that secured environments might have to be "hibernate-enabled" in order to allow hibernate's classloader to do anything at all.

I'll be playing with this for a while, because it' entirely possible my concerns are based on inexperience and this really is the best thing since, oh, pasteurization.

(But I doubt it.)