Thursday, 3 January 2013

Hibernate and JPA Course Progress

This course has now been released (on Feb 14 2013) - full details here
I'm very sorry for the long delay in blog posts - but I've been very busy recording the Hibernate course. I'm glad to report that despite taking a long time (I started in July!), the course is looking great, and getting close to completion (current estimate - end of January).

I've found the big problem with Hibernate is that whilst it's easy enough to get up and running (you can persist your first object in no time), Hibernate is deep. But it's deep in a different way to - say for example - Spring.

With Spring, you can learn the fundamentals and start working on a project. The depth in Spring comes from the fact that it's huge and has many different features. But you don't need to know all these features right away - if you have the fundamentals (mainly Dependency Injection), you can learn the pieces you need as you go along.

But with Hibernate, a little knowledge can be dangerous. Sure, you can persist a few objects, but you will soon hit a brick wall. And it's very easy to blame Hibernate for being too complex/too buggy/too random - when it's really a lack of knowledge causing your frustration.

I've been determined that in this course, I will cover everything you need to know to be fully competent in Hibernate, and so I'm not shying away from drilling really quite deep. 

A second problem is that it is easy enough to work with Hibernate when you're opening a session in a simple method, doing a bit of persistence and then closing the session. But real architectures don't do this, so I've recorded a chapter showing how Hibernate works in Web Applications, in JavaEE applications and in Spring Applications.

Yet another difficulty is that we really need to cover BOTH JPA and Hibernate, and that's hard to do without confusing (the major textbook on Hibernate tries to cover both at the same time, and it's a bit of a mess). So my compromise is that we start with classic Hibernate, and fully understand the Session API, and then halfway through the course we switch over to JPA and work exclusively with EntityManager. I hope this approach has worked.

Anyway, I'll get back to it now and I will announce when it's finished. I've still to do some quite hard stuff - Lazy Initialisation and Caching are two big ones that I'm particularly dreading, but the end is in sight. I hope the wait will be worth it!


  1. Hi Richard,This may not be the right place to ask this . Do you know how we can do client side validation using Spring MVC?Is there ane quivalent to Struts HTML Tag Library's javascript tag ?

  2. Great Job Richard! Looking forward to booking this course!

  3. Sorry Ninja, I missed your question. There doesn't seem to be much available, there's a stack overflow thread about it here: