The New Kid on the Block: Spring Data JDBC

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 21

  • @concernedcitizen1729
    @concernedcitizen1729 ปีที่แล้ว +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.

  • @jun1st
    @jun1st 5 ปีที่แล้ว +9

    that's right. JPA/Hibernate is complicated.

  • @415277787
    @415277787 5 ปีที่แล้ว +4

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

  • @scarletdice
    @scarletdice 5 ปีที่แล้ว

    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.

  • @Morrado
    @Morrado 3 ปีที่แล้ว

    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 3 ปีที่แล้ว

      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 th-cam.com/video/GOSW911Ox6s/w-d-xo.html

    • @milanplesa9118
      @milanplesa9118 3 ปีที่แล้ว +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 :)

  • @gabrielferrer3205
    @gabrielferrer3205 3 ปีที่แล้ว

    Is there a github code for this?

  • @theNikki1
    @theNikki1 ปีที่แล้ว

    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.

  • @koungamichel7781
    @koungamichel7781 5 ปีที่แล้ว

    Like this...

  • @user-il2px3wg7e
    @user-il2px3wg7e 5 ปีที่แล้ว +1

    I like data jdbc。

  • @PrashanthG
    @PrashanthG 5 ปีที่แล้ว +6

    Lazy loading sometimes mystery

  • @xandrviking1113
    @xandrviking1113 11 หลายเดือนก่อน

    Perfect, thanks ❤

  • @FredrikRambris
    @FredrikRambris 3 ปีที่แล้ว +2

    What so wrong with typing your own SQL statements?

  • @CodeWithSen
    @CodeWithSen 5 ปีที่แล้ว

    Interesting..

  • @tudz123
    @tudz123 3 ปีที่แล้ว +1

    7:57 savagery

  • @umuterturk9361
    @umuterturk9361 4 ปีที่แล้ว

    for god's sake we need proper example project!

  • @sergioesamayoa
    @sergioesamayoa 5 ปีที่แล้ว +5

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

    • @patrickproctor3462
      @patrickproctor3462 5 ปีที่แล้ว

      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 5 ปีที่แล้ว

      there is a PagingAndSortingRepository ready to implement, provided by spring

    • @concernedcitizen1729
      @concernedcitizen1729 ปีที่แล้ว

      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.