Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Hibernate - Myths and Over-Engineering: ORMs vs SQL vs Hexagonal Architecture

JetBrains via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Join Gavin King, creator of Hibernate and current IBM developer, in this comprehensive interview that cuts through decades of ORM misconceptions and over-engineering practices. Discover pragmatic approaches to Java persistence that prioritize shipping working software over architectural purity. Learn when to abandon complex repository patterns in favor of simple SQL queries or database views, especially when dealing with legacy schemas. Explore the three inheritance mapping strategies and understand why table-per-class mapping can hurt performance. Examine how the DRY principle extends beyond mere code duplication to encompass thoughtful design that emerges through refactoring rather than upfront architecture. Compare stateless versus stateful sessions to reduce magical behaviors and unexpected bugs in your applications. Understand how Jakarta Data 1.0 and 1.1 differ from Spring Data patterns and why these differences benefit developers. Master techniques for handling legacy database schemas, optimizing performance, and embracing the reality that leaky abstractions can actually be beneficial. Gain practical rules of thumb for writing efficient SQL and minimizing database round-trips while avoiding the dreaded LazyInitializationException. The discussion covers when ORMs excel at operations over object graphs versus when raw SQL queries provide better solutions for single-screen displays.

Syllabus

00:00 Teaser
01:00 Gavin King intro and early Hibernate motivation
03:59 Old-school open-source culture and discovery
08:39 SQL isn’t hard: minimize DB round-trips
10:03 “Leaky abstractions are good” and why
12:04 Architecture should emerge from code
15:44 DRY as commandment #1
22:05 Reviewing a typical Spring Data setup and pitfalls
25:39 Inheritance strategies: joined vs single table vs table-per-class
30:06 One screen? Just write a SQL query pragmatism
33:08 When ORM shines: operations over graphs
35:22 Use views to adapt messy legacy schemas
43:18 Jakarta Data repos: annotation-driven, step-into-able
44:59 Stateless Session: less magic, explicit updates
48:51 Jakarta Data 1.1: stateful repos, dynamic queries, reactive
1:24:22 Rapid fire questions
1:33:15 Features Gavin would delete and lessons learned
1:42:30 Giveaway

Taught by

IntelliJ IDEA by JetBrains

Reviews

Start your review of Hibernate - Myths and Over-Engineering: ORMs vs SQL vs Hexagonal Architecture

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.