Domain
Driven
Design

& Rapid Change

$ whoami

@benjiweber
http://benjiweber.com/blog

http://unruly.co/

Rapid Change

2 years
12 → 120 people
1 → 8 countries

Talk Structure

DDD & Extreme Programming
Mistakes, Lessons & Success

You?

DDD & XP

Extreme
Programming

Embrace Change

#noprojects
Big ideas
Change of direction

Rapid Value

Concept → Prod in 2 hours
Find out how — Tomorrow

Pair Rotation

Ideal Design Environment?

Not valid for long
Little implementation time
Lack of domain experts

XP Design

Simplicity
Incremental
Ruthless Refactoring

"Invest in the design of the system every day. Strive to make the design of the system an excellent fit for the needs of the system that day.

When your understanding of the best possible design leaps forward, work gradually but persistently to bring the design back into alignment with your understanding."

Kent Beck - XP Explained

What about DDD?


"In the 12 practices of Extreme Programming, the role of a System Metaphor could be fulfilled by a Ubiquitous Language

Projects should augment that language with System Metaphors or other large scale structures when they find one that fits well"

Eric Evans - Domain Driven Design

Why Bother?

Collaborate with Customers

Get out of our
Tech Bubble

Oh, that my words were recorded,
that they were written on a scroll,
that they were inscribed
with an iron tool on lead
or engraved in rock forever!

Job - The Bible

Code is Persistent Conversations

XP & DDD

Effective Customer Communication
Ubiquitous Language
Enriched with Idioms
Incremental Design

When it
Went Wrong

Context Blindness

Huge Model

>100 classes
Confusing Conversations

Refactoring into Contexts

Follow personas
Adops - Campaign Config
Finance

Lessons

Split Teams
Conway's Law
Creatives

Hearing, but not listening

Ads

Vocabulary is the First Symptom
Unclear requirements
Code smells soon after

Why?

Refactoring Resistance

Tests
ORM
Templating
Security

Lessons

Listen
If it hurts, do it more often
Frameworks are Insidious
Tests with but one assertion

Consistency is Overrated

Inherently Change Resistant

Perfect is the enemy of the good


Focus on Communication
Translation Layer
Keeping up is impossible

DRY is a Trap

Shared Entities

Incompatible object graphs

Artifact Versioning

Do you test every permutation?

Separate Contexts

Contextual Blindness Again

Lessons

Don't version artifacts
Redeploy affected
Deploy often - identify boundaries

Large Aggregates

Load all the things

ORMs hide the crazy

Lessons

Don't use lazy loading
Make performance explicit
Identifiers over References

When it
Works Well

Acceptance Tests

Shared Language with AdOps

Summary

Grown fast
Move fast
Think DDD helps
It's hard

Key Points

Do painful things often
Frameworks are Insidious
Continually Integrate
All about conversations

Thanks so much for listening!

Questions?

We're hiring - talent@unrulymedia.com