[Email #2 of 4] What if your persistence layer is NOT a slow black box?

Thorben3 min read

As I 'threatened' yesterday, I might get a bit carried away here...

In a recent conversation, someone described working with Hibernate as:

"You add a few annotations, and then you don’t know what Hibernate does. It might or might not work, but it’s for sure a black box with performance problems."

Wow ... that’s a sad view of one of the most popular Java persistence frameworks. And I’ve heard similar things about Spring Data JPA.

I know where all this is coming from, but this is a skill problem, not a tech one.

With Hibernate and Spring Data JPA, it might seem like you only need a few annotations and interface definitions to build your persistence layer. But if you do it like that:

  • You have no clue how your persistence layer interacts with the database.

  • You recognize during testing or (even worse) in production that your database contains the wrong data or that some data is missing entirely.

  • Your persistence layer gets slower and slower the more data your application has to manage.

So, you need to do things differently.

You need to really understand how your persistence layer works before you deploy it to production.

I’m Thorben, a freelance software engineer from Germany who works as a consultant and trainer, loves chess, and drinks too much coffee.

For the last 10+ years, I’ve spent almost all of my time helping teams build better persistence layers.

But it didn’t start like that. I started using Hibernate in 2001 and Spring Data JPA a few years later. Since then, I’ve built persistence layers for complex business applications in the telecommunication, medical, forensic, and food industry. And I’ve coached teams to improve their persistence layers in insurance, banking, medical, transportation, agriculture, and many other industries.

All of these projects were different. But they had 1 thing in common:

The team's understanding of their persistence framework determined the quality of their persistence layer and the success of their application.

I know this might sound crazy. But the main job of every application is to work with the data it’s managing. And that makes efficiently writing and reading data a crucial factor for the success of your application.

And the only way to guarantee that your persistence layer works efficiently is to understand your persistence framework. Without that, you can’t control the success of your project.

So, how to get started?

I will talk about that tomorrow when I'm gonna share with you what building an engine has in common with building better persistence layers...

See you there,

Thorben

PS. It really does mean the world that you're on my list, and I'd love to know what kind of applications you’re working on. Hit reply and let me know...

  1. Check out the latest tutorials on the blog.
    Stay up to date with the latest releases and features in the Java persistence world. Read the blog.

  2. Watch my tutorials on YouTube.
    You prefer videos over written content? Then my YouTube channel is the right place for you.

  3. Get my Hibernate Tips ebook.
    The ebook is packed with ready-to-use solutions to help you solve your next Hibernate problem even quicker. Get it here.

  4. Join the Persistence Hub.
    The Persistence Hub teaches you everything you need to know on your journey to becoming a Java persistence expert. Get access to video courses, Expert Sessions with amazing guests, monthly Java Persistence News, and more. Become a member.

Thorben Janssen, Elser Bruch 63, 33106, Paderborn, Germany
4 links in this issue

Sent by Thorben Janssen Newsletter. Links that track readers or name the subscriber were removed from this copy; its images still load from the sender's own servers. If you publish this newsletter and want an issue corrected or removed, write to us.