• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA and Hibernate

 
Ronald Alarcon
Greenhorn
Posts: 22
Android Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wellcome Richard Chesterwood!
Why some experts say that: "JPA is not an implementation, it will not provide any concrete functionality to your application". And whats the difference against Hibernate?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
 
Richard Chesterwood
Virtual Pair Programmers Rep
Greenhorn
Posts: 29
7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is indeed a common source of confusion. Jaikiran's links should help, but briefly:

JPA is just a specification, effectively a collection of Java interfaces that specify that, for example, to call JPA you will use an interface called "Entity", with a fixed collection of methods.

Anybody is free to implement JPA, and they can then compete with the other implementations. Perhaps one implementation of JPA is fast, perhaps another has better documentation.

The big implementations are Hibernate (although it has a non standard "classic" mode which pre dates JPA and many projects are still using), EclipseLink (not related to the IDE, it used to be called TopLink from Oracle) and OpenJPA from Apache.

So JPA will provide you will the interfaces, but the concrete implementations will be a set of JAR files on your classpath.

Cheers
Richard.
 
Carlos Borrero
Greenhorn
Posts: 22
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard,

What do you envision for Hibernate in a near future compared to other options in the Market and what is the best advised you can give for a beginner before jumping into Hibernate,

Thank you Richard,
 
Richard Chesterwood
Virtual Pair Programmers Rep
Greenhorn
Posts: 29
7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carlos Borrero wrote:Hi Richard,

What do you envision for Hibernate in a near future compared to other options in the Market and what is the best advised you can give for a beginner before jumping into Hibernate,

Thank you Richard,


Hi Carlos, to be honest I've stopped trying to predict the future because I'm always wrong!

To be a beginner, I would recommend:

1) favour JPA over the classic Hibernate API, although I would still learn both. Try not to get to wound up over the difference, it was largely a political thing and we just have to deal with the differences.

2) Don't think that JPA is a "keep SQL simple" tool, you need to invest just as much time in learning efficient SQL. Or have a friendly DBA type on hand.

3) The other options in the market right now are of course the "NoSQL" databases, so if you can also invest some time in learning some of the leading NoSQL databases like Neo4j, Mongo etc. Some predictions are for a polyglot database world, so the programmer of the future may need to be fluent in them all.

That's just my opinion - good luck!
Richard.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic