+ All Categories
Home > Technology > Common ddd pitfalls

Common ddd pitfalls

Date post: 24-May-2015
Category:
Upload: tom-janssens
View: 472 times
Download: 2 times
Share this document with a friend
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".
Popular Tags:
72
Common DDD pitfalls @ToJans - 2014
Transcript
Page 1: Common ddd pitfalls

Common DDD pitfalls

@ToJans - 2014

Page 2: Common ddd pitfalls
Page 3: Common ddd pitfalls
Page 4: Common ddd pitfalls

Str

ate

gic

Page 5: Common ddd pitfalls

Tactica

l

Str

ate

gic

Page 6: Common ddd pitfalls

Tactica

l

Infrastructure Str

ate

gic

Page 7: Common ddd pitfalls

Tactica

l

Infrastructure Str

ate

gic

Selling it

Page 8: Common ddd pitfalls

Tactica

l

Infrastructure Str

ate

gic

Selling it

Genera

l

Page 9: Common ddd pitfalls

Str

ate

gic

Bounded contexts

Page 10: Common ddd pitfalls

Str

ate

gic

Bounded contexts

Page 11: Common ddd pitfalls

Str

ate

gic

Ignoring bounded contexts

Page 12: Common ddd pitfalls

Str

ate

gic

Ignoring bounded contexts

Page 13: Common ddd pitfalls

Str

ate

gic

Conway’s law

Page 14: Common ddd pitfalls

Str

ate

gic

Conway’s law

Page 15: Common ddd pitfalls

Str

ate

gic

“Gedankenexperiment”

Page 16: Common ddd pitfalls

Str

ate

gic

“Gedankenexperiment”

Page 17: Common ddd pitfalls

Str

ate

gic

Lack of a domain expert

Page 18: Common ddd pitfalls

Str

ate

gic

Lack of a domain expert

Page 19: Common ddd pitfalls

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

Tactica

l

Page 21: Common ddd pitfalls

Tactica

l

Page 22: Common ddd pitfalls

Tactica

l

DDD for non-core domains

Page 23: Common ddd pitfalls

Tactica

l

DDD for non-core domains

Page 24: Common ddd pitfalls

Tactica

l Ignoring some aspects

Page 25: Common ddd pitfalls

Tactica

l Ignoring some aspects

Page 26: Common ddd pitfalls

Tactica

l

Repositories, exposing state

Page 27: Common ddd pitfalls

Tactica

l

Repositories, exposing state

https://www.facebook.com/Jeroom.Inc

Page 28: Common ddd pitfalls

Tactica

l

In repos, “Tell, don’t ask”

Page 29: Common ddd pitfalls

Tactica

l

In repos, “Tell, don’t ask”

… but don’t overdo it

Page 30: Common ddd pitfalls

Infrastructure

Page 31: Common ddd pitfalls

Infrastructure

BDUF – what you built

Page 32: Common ddd pitfalls

Infrastructure

BDUF – what you need

Page 33: Common ddd pitfalls

Infrastructure

Frameworks <> Libraries

Page 34: Common ddd pitfalls

Infrastructure

Frameworks <> Libraries

Page 35: Common ddd pitfalls

Infrastructure

Frameworks & Libraries: too generic

Page 36: Common ddd pitfalls

Infrastructure

Generic frameworks & Libraries => hacks

Page 37: Common ddd pitfalls

Infrastructure

Eventual consistency: do you need it?

Page 38: Common ddd pitfalls

Infrastructure

Eventual consistency: do you need it?

Page 39: Common ddd pitfalls

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

Selling it

Selling DDD to your peers & bosses

Page 41: Common ddd pitfalls

Selling it

Tough

Page 42: Common ddd pitfalls

Selling it

Really tough

Page 43: Common ddd pitfalls

Selling it

This is a different presentation

Page 44: Common ddd pitfalls

Selling it

… but I’ll show you the recap

Page 45: Common ddd pitfalls

And now it’s time for a

Page 46: Common ddd pitfalls

And now it’s time for a

Page 47: Common ddd pitfalls

Recap And now it’s time for a

Page 48: Common ddd pitfalls

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

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

Infrastructure

• Don’t build a BDUF

• Frameworks <> libraries

• Avoid hacks

• Aim for simplicity, not ease of building

Page 51: Common ddd pitfalls

Selling it

• Don’t force feed

• Lead by example

• One step at a time

Page 52: Common ddd pitfalls

Genera

l

Page 53: Common ddd pitfalls

Genera

l

Page 54: Common ddd pitfalls

Genera

l

Page 55: Common ddd pitfalls

Genera

l

Page 56: Common ddd pitfalls

Genera

l

Page 57: Common ddd pitfalls

Genera

l

Page 58: Common ddd pitfalls

Genera

l

HAVE FUN!

Page 59: Common ddd pitfalls

And now it’s time for

Page 60: Common ddd pitfalls

Questions And now it’s time for

Page 61: Common ddd pitfalls
Page 62: Common ddd pitfalls
Page 63: Common ddd pitfalls

What was the background seeded by?

Page 64: Common ddd pitfalls

Brightness was upped

Page 65: Common ddd pitfalls

Image was colorized

Page 66: Common ddd pitfalls

Color was removed

Page 67: Common ddd pitfalls

Huge blur was applied

Page 68: Common ddd pitfalls
Page 69: Common ddd pitfalls
Page 70: Common ddd pitfalls
Page 71: Common ddd pitfalls
Page 72: Common ddd pitfalls

Recommended