common ddd pitfalls
DESCRIPTION
While DDD is becoming more and more popular, there are quite a few potential misinterpretations and malpractices floating around. These issues are time-consuming, and they induce a lot of frustrations and needless yak-shaving experiences. These pitfalls are plenty, ranging from higher level things (for example a lack of focus on the strategic part) to technical things (for example misinterpretations of the repository pattern), and even the surrounding area (for example errors made when"selling DDD" to your team members). By sharing this experience I hope to reduce the huge amount of time and effort people spend on "doing DDD wrong".TRANSCRIPT
![Page 1: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/1.jpg)
Common DDD pitfalls
@ToJans - 2014
![Page 2: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/2.jpg)
![Page 3: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/3.jpg)
![Page 4: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/4.jpg)
Str
ate
gic
![Page 5: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/5.jpg)
Tactica
l
Str
ate
gic
![Page 6: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/6.jpg)
Tactica
l
Infrastructure Str
ate
gic
![Page 7: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/7.jpg)
Tactica
l
Infrastructure Str
ate
gic
Selling it
![Page 8: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/8.jpg)
Tactica
l
Infrastructure Str
ate
gic
Selling it
Genera
l
![Page 9: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/9.jpg)
Str
ate
gic
Bounded contexts
![Page 10: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/10.jpg)
Str
ate
gic
Bounded contexts
![Page 11: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/11.jpg)
Str
ate
gic
Ignoring bounded contexts
![Page 12: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/12.jpg)
Str
ate
gic
Ignoring bounded contexts
![Page 13: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/13.jpg)
Str
ate
gic
Conway’s law
![Page 14: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/14.jpg)
Str
ate
gic
Conway’s law
![Page 15: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/15.jpg)
Str
ate
gic
“Gedankenexperiment”
![Page 16: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/16.jpg)
Str
ate
gic
“Gedankenexperiment”
![Page 17: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/17.jpg)
Str
ate
gic
Lack of a domain expert
![Page 18: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/18.jpg)
Str
ate
gic
Lack of a domain expert
![Page 19: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/19.jpg)
Str
ate
gic
Bounded contexts
A lot Little
POV
Amount
Up- / Downstream A lot Little
Contracts
Dependencies
Some things that work *
* n = 1
![Page 20: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/20.jpg)
Tactica
l
![Page 21: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/21.jpg)
Tactica
l
![Page 22: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/22.jpg)
Tactica
l
DDD for non-core domains
![Page 23: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/23.jpg)
Tactica
l
DDD for non-core domains
![Page 24: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/24.jpg)
Tactica
l Ignoring some aspects
![Page 25: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/25.jpg)
Tactica
l Ignoring some aspects
![Page 26: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/26.jpg)
Tactica
l
Repositories, exposing state
![Page 27: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/27.jpg)
Tactica
l
Repositories, exposing state
https://www.facebook.com/Jeroom.Inc
![Page 28: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/28.jpg)
Tactica
l
In repos, “Tell, don’t ask”
![Page 29: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/29.jpg)
Tactica
l
In repos, “Tell, don’t ask”
… but don’t overdo it
![Page 30: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/30.jpg)
Infrastructure
![Page 31: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/31.jpg)
Infrastructure
BDUF – what you built
![Page 32: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/32.jpg)
Infrastructure
BDUF – what you need
![Page 33: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/33.jpg)
Infrastructure
Frameworks <> Libraries
![Page 34: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/34.jpg)
Infrastructure
Frameworks <> Libraries
![Page 35: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/35.jpg)
Infrastructure
Frameworks & Libraries: too generic
![Page 36: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/36.jpg)
Infrastructure
Generic frameworks & Libraries => hacks
![Page 37: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/37.jpg)
Infrastructure
Eventual consistency: do you need it?
![Page 38: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/38.jpg)
Infrastructure
Eventual consistency: do you need it?
![Page 39: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/39.jpg)
Infrastructure
Anything: do you need it?
”Il semble que la perfection soit atteinte
non quand il n'y a plus rien à ajouter,
mais quand il n'y a plus rien à retrancher.”
Antoine de Saint-Exupéry
![Page 40: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/40.jpg)
Selling it
Selling DDD to your peers & bosses
![Page 41: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/41.jpg)
Selling it
Tough
![Page 42: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/42.jpg)
Selling it
Really tough
![Page 43: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/43.jpg)
Selling it
This is a different presentation
![Page 44: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/44.jpg)
Selling it
… but I’ll show you the recap
![Page 45: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/45.jpg)
And now it’s time for a
![Page 46: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/46.jpg)
And now it’s time for a
![Page 47: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/47.jpg)
Recap And now it’s time for a
![Page 48: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/48.jpg)
Str
ate
gic
• Don’t ignore bounded contexts
• Understand Conway’s Law
• Think first, act later
• Have domain experts
Craft BCs and make them explicit
![Page 49: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/49.jpg)
Tactica
l
• Only in core domains
• Find all ways to model them
• Repositories = domain only
• Repositories = Tell, don’t ask
![Page 50: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/50.jpg)
Infrastructure
• Don’t build a BDUF
• Frameworks <> libraries
• Avoid hacks
• Aim for simplicity, not ease of building
![Page 51: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/51.jpg)
Selling it
• Don’t force feed
• Lead by example
• One step at a time
![Page 52: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/52.jpg)
Genera
l
![Page 53: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/53.jpg)
Genera
l
![Page 54: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/54.jpg)
Genera
l
![Page 55: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/55.jpg)
Genera
l
![Page 56: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/56.jpg)
Genera
l
![Page 57: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/57.jpg)
Genera
l
![Page 58: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/58.jpg)
Genera
l
HAVE FUN!
![Page 59: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/59.jpg)
And now it’s time for
![Page 60: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/60.jpg)
Questions And now it’s time for
![Page 61: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/61.jpg)
![Page 62: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/62.jpg)
![Page 63: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/63.jpg)
What was the background seeded by?
![Page 64: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/64.jpg)
Brightness was upped
![Page 65: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/65.jpg)
Image was colorized
![Page 66: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/66.jpg)
Color was removed
![Page 67: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/67.jpg)
Huge blur was applied
![Page 68: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/68.jpg)
![Page 69: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/69.jpg)
![Page 70: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/70.jpg)
![Page 71: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/71.jpg)
![Page 72: Common ddd pitfalls](https://reader035.vdocuments.us/reader035/viewer/2022062220/556157b3d8b42a780d8b549b/html5/thumbnails/72.jpg)