Hibernate Tools rules, ok?
A “legacy” project I’ve recently been working on has been painful to say the least. Broken limbs, pulling teeth, that sort of thing.
No small part of the problem has been a vast, untamed database which was previously being accessed by old-school SQL-based DAOs. Whilst this has been happily performing for a couple of years, it doesn’t lend itself easily to extensibility. And besides, I really didn’t want to have to endure to this approach to complete the job. I wanted to use new stuff.
I’ve been using Hibernate quite intensively for a couple of years now and it just works. Most of the time at least[1]. So, to solve my dilemma, I settled on using Hibernate along with annotations (I like to impose limits on the number of evil XML configuration files in any project), which despite being a hot technology, still left me cold sweating at the prospect of mapping all those tables and relationships. Until I had a go at using Hiberate Tools that is.
Although Hibernate Tools “is a preview release and considered alpha quality”, this Eclipse plug-in works stunningly well. Within minutes, dozens of tables had been mapped and all the POJOs created complete with annotations. Nice! I then had to spend a fair amount of time correcting and tweaking the relationships, but this is the fun part! All the tedious monkey stuff is done for you and this is exactly what is required from developer tools.
Why can’t all software, especially open source software, be as friendly as this?
[1] As long as you don’t want to do anything too out of the ordinary, say with beta release annotations, single-table inheritance and string-based discriminators. But I suppose that’s another story.
Posted by Olly on December 2, 2005 at 4:58 pm in java
| Permalink
