Domain-Driven Aggregates Explained | Why you should use them

  Рет қаралды 1,080

Marco Lenzo

Marco Lenzo

Күн бұрын

Пікірлер: 15
@MarcoLenzo
@MarcoLenzo 11 ай бұрын
Do you use aggregates in your applications?
@grantcrose26
@grantcrose26 9 ай бұрын
Marco, I just want to thank you for the effort that goes into these videos. The Evans and Vernon books are dense -- while these videos are not a replacement for those texts, they have really helped give me a foundation and basic understanding that I can bring into my study.
@MarcoLenzo
@MarcoLenzo 9 ай бұрын
Thank you Grant 🙏 I totally agree about those books. My hope is to instill some curiosity in the audience by quoting a few key concepts.
@artemvolsh387
@artemvolsh387 10 ай бұрын
Your content is gold, complex topics, explained in a short amount of time with close to real scenario examples, that helps to understand the topic more deeply. Subscribed immediately!
@MarcoLenzo
@MarcoLenzo 10 ай бұрын
Thank you very much! Such comments motivate me to produce more content 🙏
@midoevil7
@midoevil7 10 ай бұрын
I was just thinking about layered architecture and service classes when you pointed it out 😅 That services essentially become the aggregate in layered architecture, but i think i need to check you video about why this is problematic. Anyway, great content! Especially the short video format.
@MarcoLenzo
@MarcoLenzo 10 ай бұрын
Thank you! I don't think using services instead of aggregates is problematic per se. The main issue is whether you are creating appropriate boundaries around related classes in your domain to enforce consistency. In my experience, many developers create one service class per entity. Then, they let different services depend on each other and over time it becomes very messy. It is not possible anymore to predict the flow of calls, let alone preserve the consistency of the model. In those scenarios, formalizing the concept with aggregates might give teams the chance to think about this problem and define boundaries before they become aware of it because of some nasty bug 😝
@midoevil7
@midoevil7 10 ай бұрын
@@MarcoLenzo I think I understand what you mention here. Creating a service per entity basically makes them mostly a mapper between dto and corresponding entity which just complicate things. I usually use services because they play well with spring IoC layered architecture, but a service for me represents a unit of business logic. Interdependency between services can be messy indeed, but I can see the same happening in aggregates if some helper classes are used. I think as long as the hierarchy of services is preserved, meaning upper level logic is calling lower level ones, things can be managed and we reach the same point.
@MarcoLenzo
@MarcoLenzo 10 ай бұрын
Totally agree!@@midoevil7
@MrMal40
@MrMal40 9 ай бұрын
Great video again. Thank you alot! ❤
@MarcoLenzo
@MarcoLenzo 9 ай бұрын
Thank you! 🙏
@momedalhouma14
@momedalhouma14 5 ай бұрын
What about a playlist to apply the ddd concept using java and spring boot. @Amichai Mantinband made one, but it's using microsoft...
@MarcoLenzo
@MarcoLenzo 5 ай бұрын
Thank you for the idea
@davidg1513
@davidg1513 9 ай бұрын
why people dont use ddd is a mistery to me
@MarcoLenzo
@MarcoLenzo 9 ай бұрын
Hope that no "functional bro" reads this! 😁 I think what concerns me the most is when we think we are using DDD but in reality we have no idea on what DDD is or, most importantly, what our actual approach is. 😅
Event Sourcing and CQRS Explained |  When should you use them?
12:36
Domain-Driven Design: The Last Explanation You'll Ever Need
21:05
Software Developer Diaries
Рет қаралды 10 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 3,1 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 117 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 649 М.
Ollama on Kubernetes: ChatGPT for free!
18:29
Mathis Van Eetvelde
Рет қаралды 7 М.
Event-Driven Architecture (EDA) vs Request/Response (RR)
12:00
Confluent
Рет қаралды 172 М.
Entities vs Value Objects: Which one is BETTER?
5:59
Marco Lenzo
Рет қаралды 730
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 96 М.
Eventual Consistency: How It WORKS and Why It's IMPORTANT
7:25