what i’ve learned about ddd since the book - qcon london · what i’ve learned about what is...

25
What I’ve Learned About DDD Since the Book August 2003- March 2009 Eric Evans Domain Language, Inc.

Upload: vukhanh

Post on 28-May-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned

About DDD Since the Book

August 2003- March 2009

Eric Evans

Domain Language, Inc.

Page 2: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

I am a Hands-on Modeller.

Page 3: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

What is Essential

• Creative collaboration of domain experts

and software experts.

• Exploration and experimentation

• Emerging models shaping and reshaping

the ubiquitous language.

• Explicit context boundaries

• Focus on the core domain.

Page 4: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

services entities value objects

repositories factories

What I’ve Learned About

Building Blocks

Page 5: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Building Blocks

• They are overemphasized.

• But let’s add another one anyway!

Page 6: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Domain Events

Something happened that domain experts care about.

Page 7: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What do we do with

Domain Events

• Clearer, more expressive models

• Architectural options

– Representing the state of entities

– Decoupling subsystems with event streams

– Enabling high-performance system (Greg

Young style)

Page 8: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Aggregates

Page 9: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What do we do with

Aggregates

• Consistency boundaries

– Transactions

– Distribution

– Concurrency

• Conceptual whole

– Properties

– Invariants

Page 10: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Strategic Design

• Context Mapping

• Distillation of the Core Domain

• Large-Scale Structure

Page 11: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Large-Scale Structure

It just doesn’t come up very often.

Page 12: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Setting the Stage

• Don’t spread modelling too thin.

• Focus on the core domain.

• Clean, bounded context.

• Iterative process.

• Access to domain experts.

Page 13: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

Context Mapping

Page 14: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

There are always multiple models.

Page 15: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

context The setting in which a word or

statement appears that determines its

meaning.

bounded context A description of the

conditions under which a particular model

applies.

Define Context

Page 16: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Partners

• Mutually Dependent

• Cooperative

Page 17: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Big Ball of Mud

http://www.laputan.org/mud/

Page 18: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Context Mapping

Step-by-Step

1. What models (or BBoM) do we know of?

(Draw blob for each and name it.)

2. Where does each apply? (Define

boundary in words.)

3. Where is information exchanged? (Draw

connection.)

4. What is the relationship?

(Upstream/downstream? Partner? Etc.)

Page 19: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Strategy

• Draw a Context Map.

• Work with business leadership to define

Core Domain.

• Design a platform that supports work in

the Core Domain.

• Work with management to give freedom to

the Core Domain Platform Context.

• Develop and model in the Core Domain.

Page 20: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

What I’ve Learned About

DDD and SOA

1. The service interface must be defined in

some context.

2. Internals also, but often not the same

one.

3. The service interface may define a

context boundary.

Page 21: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Precision designs are fragile

Page 22: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Precision designs are fragile

Sophisticated design techniques

are wasted in a ball of mud.

Page 23: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Anticorruption Layer

Page 24: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

Not all of a large system will be

well designed.

Page 25: What I’ve Learned About DDD Since the Book - QCon London · What I’ve Learned About What is Essential • Creative collaboration of domain experts and software experts. • Exploration

DDD Resources

www.domaindrivendesign.org

Domain-Driven Design

by Eric Evans

www.domainlanguage.com