Wednesday, March 18, 2009

The (Applied) Downside of Hibernate

Don't get me wrong. I love Hibernate. I use it for Java as well as Grails development (using the supporting GORM library).

But there is one thing I've observed -- it tends to insulate developers from the actual data and what's really going on under the covers.

Perhaps this is not a problem for traditional Web applications, such as community sites and such. But for a data-driven application with lots of proprietary content it's often necessary to explore new angles on data mining. Often, you need to walk your way through the data before you know the angle you want to take. That means writing ad hoc SQL queries and mixing and matching to see what you can produce for a new business perspective.

The problem is that developers get so used to the Hibernate representation of data and data relationships, they have no idea where to go to diagnose data problems in the underlying SQL schema. Unless you've super generalized your view of data through Hibernate, it's kind of tough getting past the Matrix (the Movie) effect... where it's rather shocking to look at the underlying schema if all you've done is view content through the Hibernate model.