Re: Move from JDBC to Apache Obj or Hibernate?



Zsolt wrote:
Hi,

our application uses a layer that is very close to JDBC. Because of known reasons (for example maintenance) we would like to move (not in one step) to a Object/Relational mapping tool system. I know that Hibernate is probably the most known and popular system however Apache Obj is an implementation of JDO that could be standard (like JDBC).

My question is whether we should start with OBJ? Hibernate fans! I do understand that hibernate is good (or very good) but my question is a long term however we will use this interface from a commercial product and in that case short term questions are also very important. As described above: we are JDBC based right now and because the application is fairly big we don't want (cannot) replace all code to use the new system.

What do you propose?

A damned good question, and one which has been keeping me awake at nights. I spent long hours studying Hibernate, but I was repulsed by the additional development burden that the XML configuration files imply, as well as the additional risk of code getting out of sync with configuration files. Checked out SimpleORM and bounced again. Considered Hibernate again, only with XDoclet to simplify matters, but still found myself dissatisfied.


My current choice is Hibernate with the Hibernate Annotations add-on. Uses Java 1.5 annotations to provide all the Hibernate metadata within the class definition. No more messy XML configs! Hooray!

Now my only problem is that Hibernate Annotations don't yet support List and Map semantics, which is pretty much essential to my style of app. But I'm assured it's coming Real Soon Now.

One of these days I'll actually get to write an app using an ORM, rather than just fantasizing about it. <g>

Luke
.



Relevant Pages

  • Re: What does everyone else do for graphically displaying data?
    ... Hibernate appears to have a steeper learning curve than plain JDBC. ... To get started with JDBC you can copy some simple examples that only use a dozen or so lines of code. ... To get started with Hibernate it appears you need to follow some rules about class structure, create some XML files and so on. ...
    (comp.lang.java.databases)
  • Re: What does everyone else do for graphically displaying data?
    ... JDBC API reference cover to cover a couple of times, ... you bind a data grid to a database table so that when you edit the ... put all JDBC code in the Model classes. ... Use something like Hibernate. ...
    (comp.lang.java.databases)
  • Re: Hibernate vs (EJB or JDBC)
    ... While Hibernate provides caching ... it does not have the flexibility of JDBC. ... EJB and Hibernate are mutually exclusive technologies, ... familiar with it's caching strategies and how it handles instanciation. ...
    (comp.lang.java.programmer)
  • Re: JDBC vs Hibernate
    ... fast and simple and very close to JDBC. ... >> My application is fairly simple, its using one database only that will ... >> don't need complex SQL logics) ... In your case Hibernate would be oversized. ...
    (comp.lang.java.databases)
  • Re: hibernate: automatically generate timestamps
    ... field (using hibernate annotations as demonstrated in Hibernate In ... hibernate as a timestamp for when it was created. ... private Date modified; ...
    (comp.lang.java.programmer)