Build faster persistence layers with Spring Data JPA 3 by Thorben Janssen @ Spring I/O 2024

Поділитися
Вставка
  • Опубліковано 26 вер 2024
  • Spring I/O 2024 - 30-31 May, Barcelona
    Slides: 2024.springio....
    Over the years, Spring Data JPA has become the de facto standard for persisting data in a relational database. It provides excellent developer productivity and is so easy to use that you can learn it within a few hours. And Spring Data JPA 3 improves all of that even further.
    But handling vast amounts of data or guaranteeing very short response times still causes many problems. Features and concepts that work perfectly fine for smaller applications start to slow down your application.
    The good news is that you can easily avoid all of this. Spring Data JPA is a great fit for complex projects with high-performance requirements. You only need to know which features to use and which to avoid.
    During this talk, I’ll show you how to get the most out of your persistence layer and which new features in Spring Data JPA 3 help you improve your application’s performance even further.

КОМЕНТАРІ • 31

  • @yadigarcaliskan6453
    @yadigarcaliskan6453 2 місяці тому +6

    All those recommendations are clear to everyone who has two years of programming experience

    • @serrrsch
      @serrrsch 2 місяці тому +7

      weird flex

  • @avalagum7957
    @avalagum7957 3 місяці тому +4

    That hibernate session metrics are very useful.
    This talk is very good.

  • @linhvudev
    @linhvudev 3 місяці тому +8

    Thank you for your talk! As usual, it convinced me get rid of JPA/Hibernate again and again. After every talk about JPA, I hate my laziness because of not switching to another, I realize I only use JPA for 'create' because I'm lazy at making a insert statement at the beginning, for others like 'update', 'delete', and especially 'read', I always have to use specific @Query instead to bypass JPA drawbacks.

    • @praveens2272
      @praveens2272 3 місяці тому +5

      JPA is good for giving demos with CRUD operations, it will suck in production.

    • @sarkar_957
      @sarkar_957 3 місяці тому

      Then what you suggest to use instead of JPA? ​@@praveens2272

    • @dominikvonlavante6113
      @dominikvonlavante6113 3 місяці тому +1

      Why are you even using an ORM when you are not using it as an ORM?! Serious skill issues here.
      I love Spring JPA, and I build custom query languages with it with the stroke of a brush. But you do have to be aware of how data bases work, how to build good schemas and how to query efficiently. Besides obviously learning how JPA/Hibernate works under the hood.

  • @jesprotech
    @jesprotech 3 місяці тому +1

    That part about the interface projections is very very interesting. Great session and really worth watching if one is used to working with the JPA. Especially when finding limitations to what we are doing.

  • @sagarrout007
    @sagarrout007 3 місяці тому +2

    Hi @Thorben, Thanks for the session. It was quite insightful.

  • @ferlezcano
    @ferlezcano 3 місяці тому

    Thorben must wear his white t-shirt + sky blue shirt whenever he talks about Hibernate.
    Excellent content as always, by the way. I have learnt so much with him over the years 💪

  • @blonditbg15
    @blonditbg15 3 місяці тому +16

    My recommendation would be to not use JPA at all, the fact that you need to know all that stuff to not hurt yourself due to incorrect framework usage (not even talking about DB performance issues) looks like a bad thing to begin with. Simpler tools like jooq seem to be better ?

    • @hardcorecode
      @hardcorecode 3 місяці тому

      jooq is not code first. it requires a database schema to already exist! that's why it's simpler! JOOQ and JPA are two completely diferent things!

    • @rodjenihm
      @rodjenihm 3 місяці тому +15

      @@hardcorecode If we are being honest, in pretty much any production system you will never let Hibernate generate the database for you and instead use Flyway or Liquibase to generate the database. So I don't think that's a bad thing.

    • @hardcorecode
      @hardcorecode 3 місяці тому

      @@rodjenihm true! what about developement! Nobody is going to let you touch there production database!! So how would you use JOOQ then?

    • @onee1594
      @onee1594 3 місяці тому

      Why not use Golang then? That's even more abstract layers off

    • @blonditbg15
      @blonditbg15 3 місяці тому

      @@hardcorecode try jooq for yourself

  • @움키-t8j
    @움키-t8j 3 місяці тому +4

    31:38 In what cases do you use interface in projections?
    What are the advantages over dto, record?

    • @CheeseStickzZ
      @CheeseStickzZ 3 місяці тому +2

      There is no advantage, same thing. Use whatever you feel like

  • @Mrhennayo
    @Mrhennayo 3 місяці тому +1

    Frankly I will use jpa as simple selects for smaller projects elsewhere pure jdbc does the job or plsql

  • @m77mo65
    @m77mo65 3 місяці тому +1

    Give me one reason ( besides query+ db ) to use jpa. Im just asking

    • @JoeBrigAI
      @JoeBrigAI 3 місяці тому +1

      Optimistic locking

  • @hasan0770816268
    @hasan0770816268 Місяць тому

    That remove example was bonkers! using lists should not have that much of a performance penalty!