Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A few questions about Hibernate and JPA training

 
Ravi Saluru
Greenhorn
Posts: 11
Java MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard,

I had couple of queries.

1. As the overview mentioned, it covers from beginner to the professional standard. Would it be having some real time examples as to how to combat production deployment complications. Or get to know common errors or mistakes to make sure we don't do them.

3. Would it cover the required configuration with some of the popular web application servers.

2. Would it be covering all the topics of Hibernate and JPA, or this is to be used as a reference.

3. Do we also need to refer to some references to understand more on Hibernate & JPA, I mean can this course be a one stop and know it all instead of know some of it.

I was really looking forward to upgrade my knowledge in Hibernate and JPA, as I just have know how knowledge - wanted to know in depth.

Thanks and Regards,
Ravi
 
Richard Chesterwood
Virtual Pair Programmers Rep
Greenhorn
Posts: 29
7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi, I hope I can help!

1. As the overview mentioned, it covers from beginner to the professional standard. Would it be having some real time examples as to how to combat production deployment complications. Or get to know common errors or mistakes to make sure we don't do them.


Yes as much as possible we are working on real world scenarios (I assume you mean real world rather than real time?). In the practicals we work on a very cut down system (just a few classes) because we don't want it to be overwhelming, but at the same time we don't dodge the real problems that you face on real projects. I musn't oversell this, because as it's a training course we can't get "too real" or you wouldn't be able to learn anything, but we're working developers ourselves and a lot of the material is based on problems we've faced.

3. Would it cover the required configuration with some of the popular web application servers.


We have a chapter towards the end that shows how to use hibernate in a web application, and we run it on Tomcat - but we don't have a lot of detail here. If you need to run it on Websphere for instance, then there's nothing about that and you'd need to use the websphere reference for details. But as we're really just using a few JAR files it shouldn't be too complex to deploy what we do on the course to any application server.

2. Would it be covering all the topics of Hibernate and JPA, or this is to be used as a reference.


I'm not going to claim it covers everything - for example we missed out Hibernate Validator and Hibernate Search - but I'm not sure any course can have 100% coverage, Hibernate is too big. We mention at the end that you will always need a couple of reference manuals to hand. I've used Hibernate since 2005 and I'm still having to google or read the books!

3. Do we also need to refer to some references to understand more on Hibernate & JPA, I mean can this course be a one stop and know it all instead of know some of it.


As with all of our courses, we've aimed to cover what we think most developers need to know. We leave some corners untouched, but the intention is that by the end (and with some practice, you will need to do the practical work), you should be ready for professional development.

I hope that helps, do ask if you need more!

Richard.
 
Ravi Saluru
Greenhorn
Posts: 11
Java MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Richard.

This question may sound a bit naive, but I was reading one of the posts... One of the guys posted as whats the difference between Hibernate and JPA.

My question is that, would you be possibly hinting at when to use Hibernate or JPA. Like pros and cons, because I have used Hibernate (Just know how and thanks to Google) but I have no idea about JPA apart from what I heard is that that it's the new trend. What impact do they have in terms of performance, usability, complexity etc.

Thanks and Regards,
Ravi
 
Richard Chesterwood
Virtual Pair Programmers Rep
Greenhorn
Posts: 29
7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Saluru wrote:Thanks for the reply Richard.

This question may sound a bit naive, but I was reading one of the posts... One of the guys posted as whats the difference between Hibernate and JPA.

My question is that, would you be possibly hinting at when to use Hibernate or JPA. Like pros and cons, because I have used Hibernate (Just know how and thanks to Google) but I have no idea about JPA apart from what I heard is that that it's the new trend. What impact do they have in terms of performance, usability, complexity etc.

Thanks and Regards,
Ravi


It's a good question, and IMO the Hibernate people haven't always made the distinction clear.

But I would say the difference between Hibernate and JPA is mainly political, and often projects will chose one or the other not for technical reasons.

JPA is a specification, so as such doesn't offer any performance or other advantages over Hibernate. But the key advantage of JPA is that since it is a specification, you can change the underlying implementation and (technically) not change your code.

So you might have coded your entire system using Hibernate as the JPA "provider". But then two years later the project manager decides they don't like Hibernate any more (because they have fallen out with someone from JBoss perhaps), so they mandate that EclipseLink (another JPA implementation) should be used instead.

In theory, all you do is change the JAR files (replace Hibernate jars with eclipselink jars), and then you're done. The code still compiles, and still runs because it's the JPA standard.

I say in theory - in practice every implementation has its own bugs and quirks. Nothing is perfect. We see a couple of these bugs on the course!

Sorry, a long answer but in summary:

"terms of performance, usability, complexity etc."

You would chose JPA if you like the ideal of being able to switch. Maybe other implementations of JPA perform better or whatever.

Why would you choose to use the "classic" hibernate API? Because there are some features in the classic API that aren't in JPA for some reason. Even then I would say that it's best to stick with the JPA API, and just use the "classic" API in the rare cases where you want a non standard feature.

So unless other posters have any other ideas, I would always favour JPA. That's why we spend more time on the course using JPA, but most of the material applies equally to both.

Richard.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic