Domain-Driven Design with Relational Databases Using Spring Data JDBC

  Рет қаралды 59,283

SpringDeveloper

SpringDeveloper

4 жыл бұрын

Abstract: Domain-driven design introduces the concepts of Aggregate, AggregateRoot, and Repository. If one takes these concepts seriously, certain habits we picked up while fighting working with JPA become unacceptable. Even more, a substantial part of the complexity of JPA seems to become superfluous. The result will be performant, scalable, and maintainable.
A drawback of this approach is that we might have to fight our database administrator. But you can’t have it all, can you?
As it turns out, Spring Data JDBC supports this approach rather well.
In this talk, I’ll present how to design an object model the DDD way, why this might be a good idea, and how to build a persistence layer for it backed by Spring Data JDBC.
And I’ll even figuratively bring some candy to pacify the Database Admins.
Speakers: Jens Schauder, Staff Software Engineer, Pivotal
Filmed at SpringOne Platform 2019
SlideShare: www.slideshare.net/SpringCent...

Пікірлер: 31
@cypcode
@cypcode 11 ай бұрын
Thank you for such an insight DDD is a must consider for every project
@pedrotorredesousa
@pedrotorredesousa 4 жыл бұрын
Awesome presentation! Thanks!
@seb1408
@seb1408 4 жыл бұрын
Thank you very much for this interesting video.
@robertwhite3503
@robertwhite3503 8 ай бұрын
I think the problem with DDD is that it is often presented in abstract examples. A real example might be an invoice. The aggregate root is the invoice number. The invoice might involve tables for customer, line items and so on. However the business users will only talk about invoices and never about line items. It is implied that you should open and save whole invoices. However this is subjective in my opinion and is usually glossed over. Most accounting systems do present the invoice lines on a single screen, so it is not clear that you should not persist a single line, rathet than update a whole invoice. However "save invoice" is understandable to all (and is one way to ensure clarity). Then there are people, like me, that are not convinced that this simplifies anything.
@amjadkarim3621
@amjadkarim3621 4 жыл бұрын
can anyone share the source code? git link...
@ChrisLee-fh4zz
@ChrisLee-fh4zz 3 жыл бұрын
DDD start at 25:01 :D
@feoktant
@feoktant 2 жыл бұрын
DDD blue book said repository is needed to focus on domain. Spring Data JDBC is more about CRUD rather than DDD's ubiquitous language. You cannot name methods as you wish, only by wrapping interface. Also, you forced to use all methods in standard interface, which you probably will never use. Some of them could be dangerous in domain, like findAll, or deleteAll.
@quangphongtran3558
@quangphongtran3558 4 ай бұрын
So cool...
@ebichu8126
@ebichu8126 3 жыл бұрын
At least for me the naming of this cool stuff is somehow misleading. Probably not using word “JDBC” would be more intriguing the devs into this project.
@hoangcuongninh2631
@hoangcuongninh2631 2 жыл бұрын
please share me repository
@georgepantazes5923
@georgepantazes5923 4 жыл бұрын
Hello, I'm learning DDD and I have a question about aggregating entities on the DDD side vs normalization of tables on the RDBMS side and the relationship/tension between the two design goals in the different parts of the stack. How is it the case that in RDBMS design, we want our tables to be normalized / split apart, and yet when we are representing entities in the Java code, we are forming aggregates, thus grouping those separated tables back together? It seems counterintuitive that on the DB side, we really want those tables split apart, but then on the Java side with DDD we are aggregating them. Especially counterintuitive is working with aggregates as a unit, all grouped together and effectively bound together? Wouldn't this imply that the normalized DB tables were split apart unnecessarily and those separate tables should be merged? What am I missing in order to better understand why DB tables are normalized/split apart but DDD groups these things into an aggregate/unit?
@darkr0astedblend
@darkr0astedblend 3 жыл бұрын
Aggregates should be small and should only have references to other aggregates. You must ask if normalization is a domain concept or a technical concept. If you'd be using a non-relational database, like mongo, then you could store your aggregate as a single document/object.
@UTUBDZ
@UTUBDZ 3 жыл бұрын
I recommend you to watch Chris Richardson - kzfaq.info/get/bejne/bdGIZsmklda7p5c.html , much more informative actually.
@gauravpolekar2158
@gauravpolekar2158 3 жыл бұрын
I had the same question, and what if we are writing code on the already existing database schema.
@salmanmohammed8894
@salmanmohammed8894 2 жыл бұрын
Chapter 6, of the Domain Drive Design book (by Eric Evans); subtopic titled "Designing Objects for Relational Databases" starting on page 159 discusses some interesting points about this topic. I suggest you take a look at it.
@hiamitchaurasia
@hiamitchaurasia 4 жыл бұрын
If you are watching, watch after 39:27.
@szelpe
@szelpe 4 жыл бұрын
There is plenty of great content before that as well.
@yapadqoi
@yapadqoi 3 жыл бұрын
Thanks for the hint, I was litterally getting bored
@tosho_ait
@tosho_ait Жыл бұрын
Modeling your Domain as DB Entity objects is the opposite of good DDD....
@genericperson8238
@genericperson8238 3 жыл бұрын
I’m tired of the relational model being compared to the “old” especially when you consider that many NoSQL solutions are based on concepts which are even older. Those general purpose RDBMs solutions are comparatively old, yes but many novel solutions based on the relational model exist too.
@atataheri
@atataheri 2 жыл бұрын
High-profile stuff was discussed in there, but MongoDB handles it all!
@geonhyeokgo2350
@geonhyeokgo2350 2 жыл бұрын
Maybe Spring Data Aggregate is better name than Spring Data JDBC
@faisaladil5793
@faisaladil5793 4 жыл бұрын
A complete waste of time. How about actually talking about the topic with a quick small demo project.
@olegvorkunov5400
@olegvorkunov5400 3 жыл бұрын
Half of the presentations are Meme. Horrible.
@Boss-gr4jw
@Boss-gr4jw 4 жыл бұрын
This presentation has nothing to do with DDD. Nothing useful here at all unfortunately.
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt 4 жыл бұрын
It talks about Aggregates as a solution to the problems with JPA. Aggregates are a DDD pattern.
@milosbiljanovic6343
@milosbiljanovic6343 Жыл бұрын
Yes but it also mentions that LegoModel is an (DDD) entity from DB perspective. Your Domain should never be coupled with DB. On one hand you have your Domain with Entities and Value objects and you can reason abou them depending on your domain/context. On the other hand there is your DB which is just a way of persisting them.
@vibedistortion
@vibedistortion 4 жыл бұрын
more and more really useless speeches found from pivotal members. What is going on over there? and omg if you not Josh Long - where is github link of your demo? can I quickly look for it not in blurry mode? cmn ....
@kisan-majdoorkalyansamiti7390
@kisan-majdoorkalyansamiti7390 2 жыл бұрын
DDD is stupid concept I have been searching the stupid made it popular and which stupid use to say to design ddd is sufficient. If any one know that gr8 guy let me know
@koustubhmokashi4047
@koustubhmokashi4047 Жыл бұрын
Eric Evans
@oiraqih
@oiraqih 3 жыл бұрын
As boring as the sofa example!
The New Kid on the Block: Spring Data JDBC
1:04:53
SpringDeveloper
Рет қаралды 27 М.
Developing microservices with aggregates - Chris Richardson
1:09:50
SpringDeveloper
Рет қаралды 275 М.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 29 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 51 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 29 МЛН
Spring Data JDBC: Beyond the Obvious
52:40
SpringDeveloper
Рет қаралды 16 М.
DDD & REST - Domain Driven APIs for the web - Oliver Gierke
1:15:16
SpringDeveloper
Рет қаралды 166 М.
Reactive DDD: Modeling Uncertainty - Vaughn Vernon
1:15:16
SpringDeveloper
Рет қаралды 22 М.
Building microservices with event sourcing and CQRS
1:24:33
SpringDeveloper
Рет қаралды 112 М.
Event-Driven Architectures for Spring Developers
1:09:45
SpringDeveloper
Рет қаралды 38 М.
How to Get Productive with Spring Boot
1:03:56
SpringDeveloper
Рет қаралды 18 М.
Best Practices to Spring to Kubernetes Easier and Faster
1:07:42
SpringDeveloper
Рет қаралды 23 М.
Reactive Relational Database Connectivity with Spring
58:10
SpringDeveloper
Рет қаралды 29 М.
Do’s and Don’ts: Avoiding First-Time Reactive Programmer Mines
58:38
Я УКРАЛ ТЕЛЕФОН В МИЛАНЕ
9:18
Игорь Линк
Рет қаралды 118 М.
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 4,1 МЛН
Как распознать поддельный iPhone
0:44
PEREKUPILO
Рет қаралды 1,9 МЛН