Comparison with Hibernate

314 views
Skip to first unread message

timowest

unread,
Jan 4, 2011, 1:47:08 PM1/4/11
to jOOQ User Group
You have the following arguments against Hibernate listed in your
WIki :

1) Hibernate provides no code generation. You have to do that
yourself.
2) Hibernate adds a lot of complexity between your code and the
database. You don't understand that and you don't need that.
3) Hibernate is huge. So many additional classes in your app.
4) Hibernate provides no typesafety. You have to write HQL, yet
another SQL language.

Concerning points 1 and 4, they are covered by JPA 2 Criteria, which
is supported by Hibernate.

Concerning the arguments for point 2, they are not very convincing
without going into detail. Maybe better talk about SQL vs ORM.

Concerning point 3. There are also lightweight JPA ORMs like
EclipseLink around. Just to be fair.

If you want to convert JPA users to jOOQ, you might need more
convincing arguments.

Here is a link with an ORM vs SQL discussion :
http://stackoverflow.com/questions/494816/using-an-orm-or-plain-sql

Positioning jOOQ as an ORM makes this a little bit difficult. As jOOQ
doesn't seem to be domain model driven, ORM might be a wrong label.

And here is something I wrote on StackOverflow :
http://stackoverflow.com/questions/4573975/jpa-vs-spring-jdbctemplate/4574118#4574118

Also it doesn't need to be Hibernate or jOOQ, using both will make
also sense in many cases. We are for example using Querydsl JPA + SQL
together some projects.

Just my two cents. ;)

Lukas Eder

unread,
Jan 5, 2011, 2:45:40 AM1/5/11
to jooq...@googlegroups.com
Hi Timo

Thanks for your two cents! :)

I haven't come across the main wiki page in a while, and you're right about some points. In the beginning, I felt the need to build something new, quite different from Hibernate as that's the ORM I had made most experience with (and suffered most pain with). But in the mean time, it has shown that jOOQ will never be an ORM, and that ORM could in fact build upon jOOQ:
http://programmers.stackexchange.com/questions/25037/what-would-you-think-about-a-new-java-persistence-tool-thats-not-really-an-orm/29691#29691

Following this line, jOOQ and Hibernate are not really competing products anymore. As you know from experience: "when I find the time, I'll fix those comments" :-)

Thanks anyway for the two cents. They're very appreciated!

Cheers
Lukas

2011/1/4 timowest <timo.we...@gmail.com>

timowest

unread,
Jan 5, 2011, 4:04:33 AM1/5/11
to jOOQ User Group
Hi Lukas.

I see. I have similar experiences with Hibernate. It has lots of
futures and the idea of domain driven ORM is very convincing, but in
practice in can be very complex.

Positioning jOOQ as an Java SQL toolkit might be better than as an ORM
alternative to Hibernate.

Br,
Timo.

On Jan 5, 9:45 am, Lukas Eder <lukas.e...@gmail.com> wrote:
> Hi Timo
>
> Thanks for your two cents! :)
>
> I haven't come across the main wiki page in a while, and you're right about
> some points. In the beginning, I felt the need to build something new, quite
> different from Hibernate as that's the ORM I had made most experience with
> (and suffered most pain with). But in the mean time, it has shown that jOOQ
> will never be an ORM, and that ORM could in fact build upon jOOQ:http://programmers.stackexchange.com/questions/25037/what-would-you-t...
>
> Following this line, jOOQ and Hibernate are not really competing products
> anymore. As you know from experience: "when I find the time, I'll fix those
> comments" :-)
>
> Thanks anyway for the two cents. They're very appreciated!
>
> Cheers
> Lukas
>
> 2011/1/4 timowest <timo.westkam...@gmail.com>
>
> > You have the following arguments against Hibernate listed in your
> > WIki :
>
> > 1) Hibernate provides no code generation. You have to do that
> > yourself.
> > 2) Hibernate adds a lot of complexity between your code and the
> > database. You don't understand that and you don't need that.
> > 3) Hibernate is huge. So many additional classes in your app.
> > 4) Hibernate provides no typesafety. You have to write HQL, yet
> > another SQL language.
>
> > Concerning points 1 and 4, they are covered by JPA 2 Criteria, which
> > is supported by Hibernate.
>
> > Concerning the arguments for point 2, they are not very convincing
> > without going into detail. Maybe better talk about SQL vs ORM.
>
> > Concerning point 3. There are also lightweight JPA ORMs like
> > EclipseLink around. Just to be fair.
>
> > If you want to convert JPA users to jOOQ, you might need more
> > convincing arguments.
>
> > Here is a link with an ORM vs SQL discussion :
> >http://stackoverflow.com/questions/494816/using-an-orm-or-plain-sql
>
> > Positioning jOOQ as an ORM makes this a little bit difficult. As jOOQ
> > doesn't seem to be domain model driven, ORM might be a wrong label.
>
> > And here is something I wrote on StackOverflow :
>
> >http://stackoverflow.com/questions/4573975/jpa-vs-spring-jdbctemplate...
Reply all
Reply to author
Forward
0 new messages