Slide 1

Slide 1 text

Do you really need Hibernate? Building data-centric applications with jOOQ Simon Martinelli @simas_ch martinelli.ch

Slide 2

Slide 2 text

About me 1972 1995 2000 2007 2009 2011 2012 2013 2021 2022 2023 COBOL JSR-352 Java Batch JSR-354 Money/Currency

Slide 3

Slide 3 text

JTAF - Track and Field - https://jtaf.ch

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

JPA vs jOOQ • Most conceptual differences between JPA and jOOQ are not technology-specific, but a matter of how you think about your database interactions • There are two approaches 1. Working with entity state transitions 2. Working with data set transformations • Neither approach is "the best" one; both approaches are better suited to certain use cases

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Where to Start? • Example Project • https://github.com/simasch/jooq-examples • Official Documentation • https://jooq.org • jOOQ Demo • https://github.com/jOOQ/demo

Slide 8

Slide 8 text

Database First • jOOQ assumes your database already exists • But it does not assume your database follows any rules imposed by jOOQ regarding the design

Slide 9

Slide 9 text

DB jOOQ Generator Java Classes jOOQ DSL How does jOOQ work?

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

jOOQ and JPA

Slide 12

Slide 12 text

And now? Which one to use? • jOOQs superpower • Querying • Reading nested objects • Calling functions/stored procedures • Bulk updates and deletes • JPAs superpower • Entity state transition • Cascading insert, update, delete, and orphan removal

Slide 13

Slide 13 text

Thank you! Web https://martinelli.ch E-Mail [email protected] Twitter simas_ch LinkedIn https://linkedin.com/in/simonmartinelli