Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Marco, which approach do you favor?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 141
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic