• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marco, which approach do you favor?

 
Ken Duncan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Marco,

While your new book covers multiple ways for Java to access databases, I'm interested in your own thoughts about DB access with plain JDBC vs. Spring vs. Hibernate vs. JPA vs.??? Which approach do you prefer in your own work, and why? I'm partial to using plain JDBC for debugging purposes, even though it can take a lot more code. Thanks.

Ken
 
Marco Behler
Author
Ranch Hand
Posts: 43
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken,
I usually go with plain Hibernate, lately also with spring-data-jpa (backed by hibernate) and or a little bit of JooQ.

However I consider myself to be fairly fluent with Hibernate *and* SQL and am not afraid of writing plain SQL, where Hibernate has its restrictions.

It all depends on the size of your project though and it could very well be that plain JDBC is more than enough.

Cheers
Marco
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic