The New Kid on the Block: Spring Data JDBC

Sdílet
Vložit
  • čas přidán 2. 10. 2018
  • Spring Data is mostly known as a way to create Repositories as described in Domain Driven Design (DDD) for persistence technologies like JPA, MongoDB, Redis, and others. We now support another technology: JDBC. Spring Data JDBC is an opinionated library for persisting your data to a relational database. This talk will describe the current state of Spring Data JDBC, its features and the underlying design decisions, especially how the Spring Data team attempts to walk the tightrope of offering a DDD-based API and at the same time allow precise control of each and every SQL statement issued to the database. After this talk, the audience will be able to make a well-grounded decision if Spring Data JDBC is worth to look into for their specific challenges and what to expect from it.
    Speaker:
    Jens Schauder
    Staff Software Engineer, Pivotal
    Filmed at SpringOne Platform 2018
  • Věda a technologie

Komentáře • 21

  • @concernedcitizen1729
    @concernedcitizen1729 Před rokem +1

    This turned out to be one of the greatest additions to the spring framework. They've really expanded on it. Custom queries in one line, pagination, etc etc. Absolutely amazing alternative to the 10 different ways you can perform a database operation. I start everything with a crudrepository these days and only go for a JPA component if I absolutely need to and thats rare. If you want custom SQL instead of HQL you can just annotate a method in your CRUDRepository with @Query and fill it with the SQL you need. No need to play around with entity managers, jdbc templates, etc etc.

  • @scarletdice
    @scarletdice Před 5 lety

    an auditing framework (envers like) as an add on to spring data jdbc for the next step would be a huge win to get into the corporate world to replace JPA.

  • @jun1st
    @jun1st Před 5 lety +9

    that's right. JPA/Hibernate is complicated.

  • @415277787
    @415277787 Před 5 lety +4

    I really like the Data JDBC, wish it will have more features and more simplicity.

  • @gabrielferrer3205
    @gabrielferrer3205 Před 3 lety

    Is there a github code for this?

  • @theNikki1
    @theNikki1 Před rokem

    Around 22:49 I'm not sure what are you talking about. It has nothing todo with loading from DB/cache. It's all about NOT implementing correct equals (based on ID) method in the Customer class.

  • @Morrado
    @Morrado Před 4 lety

    Does anyone know what is the status of the Spring Data JDBC in 2020? Does anyone tryed it in prod? Awesome project, but there is not so many info about it.

    • @coffeesoftware
      @coffeesoftware Před 4 lety

      well, i may be a bit biased, but it's still very much alive and well and a very natural technology to use if you're embracing a DDD-centric approach where the aggregate pattern is a key part of your data model. i loved this video czcams.com/video/GOSW911Ox6s/video.html

    • @milanplesa9118
      @milanplesa9118 Před 3 lety +2

      We have it in prod on several projects and don't have any problems with it but our tables are "small" and rarely have any connections to other tables because of architectural style. The framework itself doesn't have any production "surprises" like JPA. IMHO framework is really easy to use/learn and it does exactly what you write like it should be. Also I must be honest and say that I don't like JPA very much :)

  • @PrashanthG
    @PrashanthG Před 5 lety +6

    Lazy loading sometimes mystery

  • @koungamichel7781
    @koungamichel7781 Před 5 lety

    Like this...

  • @CodeWithSen
    @CodeWithSen Před 5 lety

    Interesting..

  • @xandrviking1113
    @xandrviking1113 Před rokem

    Perfect, thanks ❤

  • @user-il2px3wg7e
    @user-il2px3wg7e Před 5 lety +1

    I like data jdbc。

  • @FredrikRambris
    @FredrikRambris Před 3 lety +2

    What so wrong with typing your own SQL statements?

  • @YineMiBen
    @YineMiBen Před 4 lety

    for god's sake we need proper example project!

  • @tudz123
    @tudz123 Před 3 lety +1

    7:57 savagery

  • @sergioesamayoa
    @sergioesamayoa Před 5 lety +5

    Lets keep an eye on this.
    For now IMHO is useless, real world applications need sorting, paging and filtering.

    • @patrickproctor3462
      @patrickproctor3462 Před 5 lety

      Oh for god's sake just put that sort of thing in a stored procedure or view and quit nitpicking. That sort of logic should never exist in the application layer. Besides, the application layer is notoriously slow and bad at these operations.

    • @teC5
      @teC5 Před 5 lety

      there is a PagingAndSortingRepository ready to implement, provided by spring

    • @concernedcitizen1729
      @concernedcitizen1729 Před rokem

      You can write custom queries in the crud repository if you need to. @Query then any SQL you need. No need for prepared statements, entity managers and all that BS.