Domain Driven Design: What You Need To Know

  Рет қаралды 88,938

Alex Hyett

Alex Hyett

Күн бұрын

When you are trying to design software, one of the best ways to do this is to mimic how the business is structured in the real world. This makes talking to the business easier as everyone is on the same page when it comes to discussing business processes.
☕️ I don’t accept paid sponsorships and I have turned off mid-video ads. You’re welcome! If you would like to support my channel see: ko-fi.com/alexhyett
📨 Join my free weekly newsletter for advice, technology and more: newsletter.alexhyett.com
🗺️ Backend Developer Roadmap: www.alexhyett.com/backend-dev...
📝 Read me instead: www.alexhyett.com/domain-driv...
🎓 RECOMMENDED COURSES (Use code FRIENDS10 for 10% off)
The Complete Web Developer Course - academy.zerotomastery.io/a/af...
The Complete Junior to Senior Web Developer Roadmap - academy.zerotomastery.io/a/af...
Complete SQL + Databases Bootcamp - academy.zerotomastery.io/a/af...
📚 RECOMMENDED BOOKS
Domain Driven Design - geni.us/WiR0Q0x
Implementing Domain Driven Design - geni.us/4qHx
Clean Code - geni.us/5AEwj2
Domain Driven Design - geni.us/WiR0Q0x
Design Patterns - geni.us/5ncUt
Developer Hegemony - geni.us/lAXy
Pragmatic Programmer - geni.us/GfNj9
Data Structures and Algorithms Made Easy - geni.us/sqg6kJ
Refactoring - geni.us/ufAP0mE
Pragmatic Thinking and Learning - geni.us/x81A
Microservices - geni.us/8vMA
🚀 MY FAVOURITE TOOLS
PIA VPN - piavpn.com/AlexHyett (86% off)
Visual Studio Code - code.visualstudio.com/
Obsidian - obsidian.md/
Notion - affiliate.notion.so/alexhyett
⏳ TIMESTAMPS
00:00 - Introduction
00:36 - Strategic Design
00:54 - Ubiquitous Language
02:24 - Bounded Context
03:12 - Context Mapping
04:10 - Anti-Corruption Layer
04:23 - Tactical Design
You can check out more of my favourite tools on my website:
www.alexhyett.com/tech/
🔗 MY KEY LINKS
🌍 Blog - www.alexhyett.com/
🐘 Mastodon - social.alexhyett.com/@alex
🧑‍💻 WHO AM I
I’m Alex, a Software Developer and KZbin working in the UK. I make videos about software development to help developers with the skills they need to be senior developers. As well as this KZbin Channel, I also write articles on my website (alexhyett.com) as well as write a regular newsletter that contains some thoughts to help aspiring developers.
‼️ DISCLAIMERS
Some of the links in this description are affiliate links, for which I get a small commission, at no extra cost to you 🙂. I appreciate you supporting my channel so I can continue providing you with free software development content!
#coding #programming #developer

Пікірлер: 90
@computer-science-with-mani
@computer-science-with-mani 2 ай бұрын
amazing video and very helpful for anyone struggling to understand what DDD is and its core components.
@newline3521
@newline3521 26 күн бұрын
That is a great introduction for someone who wants to start reading the book. thanks
@esteban-alvino
@esteban-alvino 14 күн бұрын
Hello Alex, thanks for sharing your knowledge with the world. keep up with the great work.
@maynardewm
@maynardewm 11 ай бұрын
After watching this video, I don't think I have an understanding of how to actually do DDD, but it covers the very basic concepts at a very high level.
@alexhyettdev
@alexhyettdev 11 ай бұрын
Yes I will probably do another video in the future that breaks down how to actually do it. It is a tricky one though as it is very specific to the domain you are working on.
@ReluctantSpirit
@ReluctantSpirit 7 ай бұрын
Sorry to say but it’s difficult to understand with background music and unusual pacing of your talking. Submitting an issue to remove background music and slower the talking pac
@ReluctantSpirit
@ReluctantSpirit 7 ай бұрын
@@alexhyettdev Sorry to say but it’s difficult to understand with background music and unusual pacing of your talking. Submitting an issue to remove background music and slower the talking pace
@alexhyettdev
@alexhyettdev 7 ай бұрын
@ReluctantSpirit I have reduced the bg music on my newer videos. I may just remove it completely in future. Unfortunately I can’t change the ones already uploaded.
@patchas9674
@patchas9674 3 күн бұрын
Great one!!!
@agneszareba
@agneszareba Жыл бұрын
So well explained and presented Alex! Subcribed!
@alexhyettdev
@alexhyettdev Жыл бұрын
Thanks Agnes! I hope you are doing well.
@ariand.sialajulio7506
@ariand.sialajulio7506 Жыл бұрын
Incredible, Your explanation is very clear.
@alexhyettdev
@alexhyettdev Жыл бұрын
Thanks Arian, I am glad it was easy to understand.
@1hugarcia
@1hugarcia 9 ай бұрын
Great video. I am a functional analyst, not a dev, but we must also learn these concepts. And this is a very clear explanation. Please make as much videos about concepts of code design and architecture as possible
@alexhyettdev
@alexhyettdev 9 ай бұрын
Thank you I am glad it was helpful. Yes I will be making more videos like this in the future.
@amitev
@amitev Жыл бұрын
What a gem is this video (and the channel as well)!
@alexhyettdev
@alexhyettdev Жыл бұрын
Thank you very much!
@distinctionconsulting
@distinctionconsulting Ай бұрын
Brilliantly articulated description. Your audio is next level, what mic do you use , please?
@mahdi5796
@mahdi5796 10 ай бұрын
Very well and simply explained. Thank you
@alexhyettdev
@alexhyettdev 10 ай бұрын
You’re welcome I am glad you liked it.
@thebeardsolution
@thebeardsolution Жыл бұрын
Great video as always!
@alexhyettdev
@alexhyettdev Жыл бұрын
Thanks mate!
@YN-wv1rd
@YN-wv1rd 11 ай бұрын
Thanks for your concise explanation with easy-to-understand examples. I started reading Creating Software with Modern Diagramming Techniques By Ashley Peacock, and it suggests reading "Domain-Driven Design: Tackling Complexity in the Heart of Software By Eric Evans" to understand DDD. Though I luckily found the title in the O'reilly online library, your video saved my time. I subscribed.
@alexhyettdev
@alexhyettdev 11 ай бұрын
You’re welcome, I am glad it was helpful for you!
@warrenmarkham8891
@warrenmarkham8891 8 ай бұрын
Thank you for sharing the book references. The diagramming book sounds very interesting and just what I am looking for. I'm a junior dev tackling a codename and I've started trying to contribute by diagramming and providing onboarding documentation.
@StanislavPogrebnyak
@StanislavPogrebnyak 2 ай бұрын
The issue of DDD is that you can design software together with disfunctions you already have in org. Basically, to make it work you need to be ready to change org based on Strategic DDD outcomes.
@readikus
@readikus 10 ай бұрын
Fantastic video. Trying to find some content for my dev team to learn a few areas of best practice, and this is a great one. Liked and subscribed ;)
@alexhyettdev
@alexhyettdev 10 ай бұрын
Thank you! I am glad you liked it.
@sebon11
@sebon11 11 ай бұрын
Bro your explanations are amazing, amazing channel Damn and you only got 4k subs? Proud to be here b4 everyone else lmao :D
@alexhyettdev
@alexhyettdev 11 ай бұрын
Thank you, I appreciate that. Hopefully my channel will keep growing!
@raffaeleloi
@raffaeleloi 6 ай бұрын
What a great video !!
@alexhyettdev
@alexhyettdev 6 ай бұрын
Thank you Raffael!
@winxalex1
@winxalex1 2 ай бұрын
Like it. Big part of the video is about Entities and VOs, which are quite common in many designs, I would like to have more of how the domains communicate between each other and what is anti corruption layer about?. Is it Event Broker with adapter layer. How the decoupling is achieved?
@furious385
@furious385 3 ай бұрын
In C# you can use records to represent ValueObjects, and they support everything ValueObjects needs.
@Great_Sahara
@Great_Sahara 4 ай бұрын
Great video. Earned a sub
@alexhyettdev
@alexhyettdev 4 ай бұрын
Awesome, thank you!
@davebudah
@davebudah 9 ай бұрын
This is quite insightful. #Subscribed.
@alexhyettdev
@alexhyettdev 9 ай бұрын
Thanks Dave!
@marcelocostanzi8029
@marcelocostanzi8029 11 ай бұрын
Hey. I really like your explanations, very clear. Just as a suggestion for future videos, please consider lowering the volume or pick something different for the background music. At times it can be very annoying, specially when using headphones. IE at 7:45, there are some punctuating sounds making it difficult to follow your speech. Otherwise great
@alexhyettdev
@alexhyettdev 11 ай бұрын
Thanks for the feedback. I will see if I can find some background music that is more uniform throughout. It is a tricky one to get right especially if the music has varying sound levels.
@davidjiang7929
@davidjiang7929 2 ай бұрын
Would you happen to have tutorials to demo how to implement ddd in c#?
@CuriousCyclist
@CuriousCyclist 3 ай бұрын
That was very, very good. Thanks. A bit fast, but I could keep up. Just about.
@matahariramadhan
@matahariramadhan Жыл бұрын
Great video, a little confused about the difference between DDD and microservice? Thanks
@alexhyettdev
@alexhyettdev Жыл бұрын
DDD is more about what you put in each microservice rather than the technology itself. It is possible to use microservices without using DDD. For example you can have microservices for each feature rather than each domain.
@rorycawley
@rorycawley 11 ай бұрын
You should write a book. This was a fantastic into to DDD. Thanks so much.
@alexhyettdev
@alexhyettdev 11 ай бұрын
I would love to write a book at some point. Thanks for the feedback 😊
@ave383
@ave383 9 ай бұрын
I'm pretty new to this and would like your feedback on my thought. I'm studying to be a cloud architect and I'm not much of a coder. When you said an aggregate maintains business invariance is this akin to a policy? making sure specific rules are enforced during deployments.
@alexhyettdev
@alexhyettdev 8 ай бұрын
Yes, it is very similar. An example could be making sure that an API passes its health checks before traffic is routed to it and rolling back the deployment if it doesn't.
@asierpaz9190
@asierpaz9190 9 ай бұрын
Hello. I noticed that services are mentioned at a somewhat high level. Can you explain application services vs domain services? Thanks.
@alexhyettdev
@alexhyettdev 9 ай бұрын
Yes, so a domain service is a service that contains core business logic. It is a key component to the application. It might be responsible for processing an order for example in an e-commerce application. Application services on the other hand provide functionality to the system but isn't domain specific logic. This could be writing to a database, logging, and email service or auditing. They are supporting services that most systems have regardless of the domain.
@SrivatsaDK
@SrivatsaDK 3 ай бұрын
So In a Person Entity for example, Name can be a Value Object?
@marna_li
@marna_li 8 ай бұрын
Sound practices when designing software and object-oriented patterns used in the right way - I feel like that is lacking. In a lot of places developers go right at the problem before actually checking with the business and designing the software - having a clear system and language for how to structure code.
@alexhyettdev
@alexhyettdev 8 ай бұрын
Yes 100%. It is always tempting to jump straight into the code but it nearly always ends up needing considerable rework later. Reminds me of the “sharpening your axe” analogy.
@salahayman3513
@salahayman3513 Жыл бұрын
Can please add more about DDD thanks for the video
@alexhyettdev
@alexhyettdev Жыл бұрын
Yes I am sure I will be doing so more about DDD in the future.
@rachelkaufman8630
@rachelkaufman8630 7 ай бұрын
Great video. I am a relatively new dev reading DDD because a coworker suggested it, and found this video because I'm finding the book remarkably dull. (😳) After watching your video, I feel like DDD is somewhat self-evident--in other words, how could you make a Netflix without separating out billing from streaming from whatever else? Please feel free to correct me. :)
@alexhyettdev
@alexhyettdev 7 ай бұрын
Yes I tried to pick an obvious example that everyone would understand. It really depends on how well everyone understands the domain. It is quite common at some companies for engineers to be building software without all the information as the stakeholders aren't willing to share or take the time for it. If you know the domain well then DDD does seem self-evident.
@rachelkaufman8630
@rachelkaufman8630 7 ай бұрын
@@alexhyettdev Thanks for the response, this makes sense!
@danielolajumoke4389
@danielolajumoke4389 10 ай бұрын
Hi there, thank you so much for the video ❤ and i would love to ask you a question. Is DDD still relevant today? Do you think a startup should do DDD? Do large enterprises like Google, Netflix (video case study), Uber and so on use DDD? Sometimes i wonder if some organizations do care about practicing this beautiful methodology as it aims to tackle complexity at the heart of the business. Your response will be highly appreciated. Cheers mate!
@alexhyettdev
@alexhyettdev 10 ай бұрын
Yes they definitely do still use DDD. I am not sure about Google but Netflix and Uber have written articles about using DDD and Hexagonal Architecture: netflixtechblog.com/ready-for-changes-with-hexagonal-architecture-b315ec967749 www.uber.com/en-GB/blog/microservice-architecture/
@danielolajumoke4389
@danielolajumoke4389 10 ай бұрын
@@alexhyettdev Thanks mate 👍. I find the links you shared insightful... You probably missed the part where I asked if you think startups should do DDD. I would love to hear your opinion on that too!
@yohami
@yohami 5 ай бұрын
DDD is ridiculous, so, no.
@khadijatmuhammad1901
@khadijatmuhammad1901 7 ай бұрын
3:48 - the statement about subscription plan...
@aamirsohailkmas
@aamirsohailkmas 18 күн бұрын
3:10 My brain is not braining at this point
@adamstrejcovsky8257
@adamstrejcovsky8257 5 ай бұрын
The video makes it feel like: "just name stuff after things in your business".
@perghosh8135
@perghosh8135 7 ай бұрын
DDD will make the code explode in size
@alexhyettdev
@alexhyettdev 6 ай бұрын
Yes, you do end up writing more code with DDD. It just depends whether it is worth the trade off.
@ragtop63
@ragtop63 2 ай бұрын
What if you only write applications for yourself?
@alexhyettdev
@alexhyettdev 2 ай бұрын
Then go nuts! No one is going to see your code anyway lol
@hgoebl
@hgoebl 5 ай бұрын
Thanks. I'd prefer the video w/out background music.
@alexhyettdev
@alexhyettdev 5 ай бұрын
Yes I think I will just do away with music in future.
@jakobmller7465
@jakobmller7465 4 ай бұрын
Cool video, but it is not clear that an aggregate is NOT an object. According to Eric Evans: "An aggregate is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each aggregate has a root and a boundary. The boundary defines what is inside the aggregate. The root is a single, specific entity contained in the aggregate. The root is the only member of the aggregate that outside objects are allowed to hold references to." It is the root and the conceptual boundary that defines the aggregate. I think the identity of the aggregate is the identity of the root.
@congxincheng5095
@congxincheng5095 8 ай бұрын
Great video explainning the concepts but it looks to me it's only delegating all the cross-domain work into the least explained anti-corruption layer which still needs knowledge of multiple domain and engineering the system itself. Great practice but it seems just not fitting for a poor team lead trying to not teach everyone everything or handling all the cross-domain work in flesh to make things work in a team not big enough.
@alexhyettdev
@alexhyettdev 8 ай бұрын
Yes you definitely need an experienced team with a good understanding of the domain in order to to do DDD well.
@catfishfortesque-smythe437
@catfishfortesque-smythe437 8 ай бұрын
Interesting content, but the editing is quite annoying. Every sentence seems to have an edit, a slight zoom, natural space cut out, so it runs into each other and just turns into ... a wall of words. The audience are not gamers with a short attention span, it's people looking for information; we can wait that extra second.
@alexhyettdev
@alexhyettdev 8 ай бұрын
Noted! Yes it is a bit of a balancing act between a boring static man in front of a camera and trying to keep the audience engaged while not making the jump cuts too jarring.
@tonymarques1624
@tonymarques1624 9 ай бұрын
Developers should not be designing- it should be an application/ system architect in close collaboration with a business analyst and product manager. If developers do the design, then we're into a world of change and security issues. Who do you see as having the responsibility for producing the domain design?
@alexhyettdev
@alexhyettdev 9 ай бұрын
I think it depends on the seniority of the developer. Many companies don’t have a system architect role and it is up to the senior developers and engineering managers to design the system architecture. This is usually with the business analysts and product managers as well. In most companies I have worked at there is usually a review team that go over the architecture to sure that all security considerations have been addressed.
@yohami
@yohami 5 ай бұрын
DDD is the most stupid shit I've ever heard, and I've been developing for 20 years and heard a LOT.
@alexhyettdev
@alexhyettdev 5 ай бұрын
😂 it is a bit of an odd one.
@MostakAhammedOfficial
@MostakAhammedOfficial 9 ай бұрын
I am not a native English speaker. I am student. I don't speak English well. Your presentation is good but it is something difficult to me to understand your accent and fluency. I suggest you to speak little more slow and fulfill the word you are saying in pronunciation. Good luck.
@alexhyettdev
@alexhyettdev 9 ай бұрын
Thanks for the feedback. I speak a lot slower in person. It is something about being in front of the camera! I am sure I will get better with practise.
@marcialabrahantes3369
@marcialabrahantes3369 4 ай бұрын
​@@alexhyettdev you are fine speed wise - there are speed controls we should all take advantage of when we're not comfortable with the speaker's speed
@diegosebasdonayref.4541
@diegosebasdonayref.4541 4 ай бұрын
Hi Alex, thank you for your video. I like the British English pronunciation. I lived for 5 months in England, at first it was a little difficult to keep up with the native speakers, I was able to learn their accent, however there are many accents in the UK. Your videos help me a lot to remember that particular English!! thank you.
@maksimluzin1121
@maksimluzin1121 2 ай бұрын
It's interesting, for sure, but you're speaking too fast and with very 'native English'. Your should speak slower and with more 'common English', acceptable for everyone. I've switched on Subtitles to understand your words from the Text, not from your voice words. Sorry...
@alexhyettdev
@alexhyettdev 2 ай бұрын
No worries, I have tried going slower in newer videos. It is more to do with nerves more than anything else. Speaking to a camera really isn't natural!
@maksimluzin1121
@maksimluzin1121 2 ай бұрын
@@alexhyettdev , OK. Thanks!
@maksimluzin1121
@maksimluzin1121 2 ай бұрын
I've got the book title, and I will read it, thanks! But your fast and compressed 'blah-blah-blah' is just absolutely useless (it was, for me). For the Foreign speakers...
Event-Driven Architecture: Explained in 7 Minutes!
7:18
Alex Hyett
Рет қаралды 75 М.
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 114 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 4 МЛН
Кәріс тіріма өзі ?  | Synyptas 3 | 8 серия
24:47
kak budto
Рет қаралды 1,7 МЛН
What is DDD - Eric Evans - DDD Europe 2019
57:06
Domain-Driven Design Europe
Рет қаралды 251 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,3 МЛН
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 160 М.
Event-Driven Architecture (EDA) vs Request/Response (RR)
12:00
SOLID Principles: Do You Really Understand Them?
7:04
Alex Hyett
Рет қаралды 113 М.
Modeling a Domain With Domain-Driven Design From Scratch | DDD
19:10
Milan Jovanović
Рет қаралды 76 М.
Что такое DDD за 10 минут с примерами
10:03
DDD Explained in 9 MINUTES | What is Domain Driven Design?
9:44
Marco Lenzo
Рет қаралды 34 М.
Domain Modeling with Domain-Driven Design (From Scratch)
18:05
Milan Jovanović
Рет қаралды 21 М.
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 1,6 МЛН
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 12 МЛН
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,4 МЛН
#miniphone
0:18
Miniphone
Рет қаралды 3,4 МЛН