4/10/2006

Toplink vs hibernate

I still remember the excitement I felt when I started working on Toplink. It was early 2000. Before that, I was working mainly in visual c++. Visual c++ community never had this type of tool; I even thought that such a tool is impossible. During that time, I attended toplink training, and was amazed to know that it can store/retrieve practically any object model into a database, with out any sql. It was not just I, every body in the training session was like that. It was like a dream come true to all of us. Over the period toplink worked very well for us, major productivity gains were there, you know all the regular ORM benefit stuff…

Though I am a fan of toplink, after looking at Hibernate, looks like Hibernate is a better framework than toplink, and for very good reasons.
Obviously, Hibernate is free (as in free beer?), has better user base, community, articles, resources, books and momentum.
Hibernate API is lot cleaner than Toplink API. Toplink API, naming conventions are unintuitive in many areas (am I picky on this?).
The most problematic feature in toplink is it is practically impossible to get away from its cache. In toplink, cache is a necessary evil, there is no simple way to bypass cache to go to db. Documentation says few options to set on its descriptor, but none of them work well. In Hibernate cache is optional, if we want we can have it, it always goes to database by default.

We are not going to switch to hibernate anyway.

orm tricks ..