Index

A

Abstractions

modeling Aggregates, 93 –95

software design problems, 5

Acceleration and management tools

Event Storming, 112 –124

managing DDD projects. See Managing DDD on Agile Project

other tools, 124

overview of, 111 –112

summary, 136

Acceptance tests

implementing DDD on Agile Project, 134

using with Event Storming, 124

validating domain model, 39 –40

Accuracy, managing in project, 130 –131

Actor model

caching Aggregates' state, 109

handling transactions, 78

using with DDD, 43

Adapters, 41 –42

Aggregate Root, defined, 77

Aggregates

associating with Commands, 120 –122

choosing abstractions carefully, 93 –95

creating Big Ball of Mud via, 59

designing as testable units, 97 –98

Domain Experts refining, 134 –136

Event Sourcing Domain Events for, 107 –109

identifying tasks/estimating effort, 129 –131

integrating using messaging, 65 –70

modeling, 88 –93

overview, 75

right-sizing, 95 –97

scenario using, 104 –105

summary, 98

in tactical design, 8 –9

transactions and, 78 –81

why they are used, 76 –78

Aggregates, design rules

commit one instance in one transaction, 79 –81

protect business invariants within boundaries, 82

reference by identity only, 84 –85

small size, 83 –84

update with eventual consistency, 85 –88

Agile Project Management Context

and Context Mapping, 52

modeling abstractions for Aggregates, 93 –5

moving concepts to other Bounded Contexts, 51

Anemic Domain Model, avoiding in Aggregates, 88 –89 , 92

Anticorruption Layer

Context Mapping, 56 –57

integrating with Big Ball of Mud via, 60

in Open Host Service, 57

RPC with SOAP using, 62

Application Services

Bounded Contexts architecture, 42

modeling Aggregates, 89

Architecture, Bounded Contexts, 41 –43

Arrowheads, in Event Storming, 123

Asynchronous messaging, 65 –70

At-Least-Once Delivery, messaging pattern, 68 –69

Atomic database transactions, 78 –79

B

Bad design, in software development, 3 –7

Behavior-Driven Development (BDD), Ubiquitous Language, 39

Big Ball of Mud

case study, 21 –24

Context Mapping and, 59 –60

turning new software into, 17

using business experts to avoid, 18 –20

using Subdomains for legacy systems, 48 –49

Big-picture Event Storming, 114

Black marker pens, for Event Storming, 115 , 122 –123

Book Design: A Practical Introduction (Martin), 5 –6

Boundaries, Aggregate

design steps for right-sizing, 95 –97

protecting business invariants within, 82

transactional consistency and, 78 –81

Bounded Contexts

aligning with single Subdomain, 49 –50

architectural components of, 41 –43

case study, 21 –24

drawing boundaries in Event Storming, 122 –124

Context Mapping between. See Context Mapping

as fundamental strategic design tool, 25 –29

modeling business policies into separate, 20

showing flow on modeling surface in Event Storming, 122 –123

in strategic design, 7 –8

Subdomains in. See Subdomains

in tactical design, 9

teams and source code repositories for, 14

understanding, 11 –14

Brandolini, Alberto, 112 –113

Business

Aggregate boundaries protecting invariants of, 82 , 95 –96

Domain Expert focus on, 17 –20 , 27 –29

Event Storming focus on, 113

Event Storming process via Domain Events, 116 –118

eventual consistency driven by, 97

focus on complexity of, 29

leaking logic when modeling Aggregates, 89

software design vs. purposes of, 4 –5

Subdomains within domains of, 46

unit testing vs. validating specifications for, 97 –98

C

Caching, Aggregate performance, 109

Causal consistency, Domain Events for, 99 –100

Challenge, 29

Claims, 19 –20 , 70 –73

Classes, 90 –94

Collaboration Context

challenging/unifying mental models, 33

and Context Mapping, 52

Command Message, 67

Command Query Responsibility Segregation (CQRS), 43 , 109

Commands, Event Storming

associate Entity/Aggregate to, 120 –122

causing Domain Events, 118 –120

Domain Events vs., 107

identifying tasks/estimating effort, 129 –131

using Domain Experts to refine, 134 –136

Complex behavior, modeling Aggregates, 93

Complexity, Domain-Driven Design reducing, 2 –3

Conformist

Context Mapping, 56

Domain Event consumers and, 67

in Open Host Service, 57

RESTful HTTP mistakes and, 64

Context Mapping

defined, 52

example in, 70 –73

making good use of, 60 –61

overview of, 51 –53

in problem space, 12

strategic design with, 8

summary, 73

using messaging, 65 –70

using RESTful HTTP, 63 –65

using RPC with SOAP, 61 –63

Context Mapping, types of

Anticorruption Layer, 56 –57

Big Ball of Mud, 59 –60

Conformist, 56

Customer-Supplier, 55 –56

Open Host Service, 57

Partnership, 54

Published Language, 58

Separate Ways, 58

Shared Kernel, 55

Core concepts

Bounded Contexts for, 25 –26

case study, 21 –24

Core Domain

challenging/unifying mental models to create, 29 –34

and Context Mapping, 52

dealing with complexity, 47 –50

defined, 12

developing Ubiquitous Language, 34 –41

Event Sourcing saving record of occurrences in, 109

Event Storming to understand, 113 –114

solution space implementing, 12

as type of Subdomain within project, 46 –47

Ubiquitous Language maintenance vs., 41

understanding, 13

Cost

Event Storming advantages, 113

false economy of no design, 5

software design vs. affordable, 4 –5

Could computing, using with DDD, 43

Coupled services, software design vs. strongly, 5

CQRS (Command Query Responsibility Segregation), 43 , 109

Customer-Supplier Context Mapping, 55 –56

D

Database

atomic transactions, 78 –79

software design and, 4 –5

DDD (Domain-Driven Design)

complexity of, 2 –3

good, bad and effective design, 3 –7

learning process and refining knowledge, 9 –10

managing. See Managing DDD on Agile Project

overview of, 1 –2

strategic design, 7 –8

tactical design, 8 –9

DELETE operation, RESTful HTTP, 63 –65

Design-level modeling, Event Storming, 114

Diagrams, 36

Domain Events

Context Mapping example, 70 –73

creating interface, 101

enriching with additional data, 104

Event Sourcing and, 107 –109

going asynchronous with REST, 65

in messaging, 65 –70

naming types of, 101 –102

properties, 103 –104

scenario using, 104 –107

summary, 109 –110

in tactical design, 9 , 99 –100

Domain Events, Event Storming

associate Entity/Aggregate to Command, 120 –122

create Commands causing, 118 –120

creating for business process, 116 –118

identifying tasks/estimating effort, 129 –131

identifying views/roles for users, 123 –124

showing flow on modeling surface, 122 –123

using Domain Experts to refine, 134 –136

Domain Experts

business drivers and, 17 –20

developing Ubiquitous Language as scenarios, 35 –41

focus on business complexity, 28

identifying core concepts, 26 –29

implementing DDD on Agile Project, 133 –134

interacting with, 134 –136

modeling abstractions for Aggregates, 93 –95

for one or more Subdomains, 46

in rapid design. See Event Storming

right-sizing Aggregates, 95 –96

Scrum, 27

in strategic design, 7 –8

E

Effective design, 6 –7

Effort, estimating for Agile Project, 129 –131

Enrichment, Domain Event, 71 –72

Entities

Aggregates composed of, 77

associating with Commands, 120 –122

defined, 76

implementing Aggregate design, 90 –91

right-sizing Aggregates, 95

Value Objects describing/quantifying, 77

Estimates

managing tasks in Agile Project, 129 –131

timeboxed modeling of tasks via, 132 –134

Event-driven architecture, with DDD, 42 , 112 –113

Event Sourcing

in atomic database transactions, 78 –79

overlap between Event Storming and, 121 –122

persisting Domain Events for Aggregates, 107 –109

Event Storming

advantages of, 113 –114

associate Entity/Aggregate to Command, 120 –122

Commands causing Domain Events, 118 –120

concrete scenarios, 35

Domain Events for business process, 116 –118

Domain Experts for, 134

event-driven modeling vs., 112 –113

identify tasks/estimate effort, 129 –131

identify views/roles for users, 123 –124

implement DDD on Agile Project, 133 –134

modeling spikes on DDD projects via, 129

other tools used with, 124

show flow on modeling surface, 122 –123

supplies needed for, 115 –116

Events, in Event Storming, 113 , 115

Eventual consistency

right-sizing Aggregates, 97

updating Aggregates, 85 –88

working with, 88

working with scenarios, 38

F

Functional programming, modeling Aggregates, 89

G

Generic Subdomain, 47

GET operation

Context Mapping example, 72

integration using RESTful HTTP, 63 –65

Globally unique identity, Aggregate design, 90 –91

Good design, software development, 3 –7

I

IDDD Workshop, 3

Idempotent Receiver, messaging, 68

Impact Mapping, 124

Implementing Domain-Driven Design ( IDDD), Vaughn, 1 , 3

Input Adapters, Bounded Contexts architecture, 42

Inspections policy, 19 –20

Iterations

accuracy of long-term estimates for, 131

identifying tasks/estimating effort, 130

implementing DDD on Agile Project, 134

incurring modeling debt during, 128 –129

as sprints, 126

K

Knowledge, 9 –10

Knowledge acquisition, 4 –5 , 6

L

Language

evolution of terminology in human, 15

Ubiquitous. See Ubiquitous Language

Latency

in message exchange, 65

RESTful HTTP failures due to, 64

Learning process, refining knowledge in, 9 –10

Legacy systems, using Subdomains with, 47 –50

M

Maintenance phase, Ubiquitous Language, 40 –41

Managing DDD on Agile Project

accuracy and, 130 –131

Event Storming, 112 –124

hiring good people, 126

how to implement, 133 –134

identifying tasks/estimating effort, 129 –131

interacting with Domain Experts, 134 –136

modeling spikes/debt, 128 –129

other tools, 124

overview of, 125 –126

summary, 136

timeboxed modeling, 132 –134

using SWOT analysis, 127 –128

Martin, Douglas, 5 –6

Memory footprint, designing small Aggregates, 83

Messaging, 65 –70

Metrics-based approach, identify tasks/estimate effort, 129 –131

Microservices, using with DDD, 43

Modeling

debt and spikes on DDD projects, 128 –129

development of roads and, 6

overview of, 1

Modules, segregating Subdomains into, 50

N

Naming

of Aggregates, 91 –92

of Domain Event types, 101 –102

Domain Experts refining Aggregate, 134 –136

Root Entity of Aggregate, 78

Network providers, RESTful HTTP failures due to, 64

No Design, false economy of, 5

No Estimates approach, 125

Nouns, in Ubiquitous Language, 34 –36

O

Object-oriented programming, Aggregates, 88 –89 , 91 –92

Open Host Service

consuming Published Language, 58

Context Mapping, 57

RESTful HTTP using, 63

RPC with SOAP using, 62

Opportunities, identifying Agile Project, 127 –128

Output Adapters, Bounded Contexts architecture, 42

P

Paper, conducting Event Storming on, 115 –116

Parallel processing, Event Storming of business process, 117

Partnership Context Mapping, 54

Performance, caching and snapshots for, 109

Persistence operations, software design vs., 5

Persistence store, Aggregates by identity for, 85

Pictures, in domain model development, 36

Policies

business group, 18 –20

Context Mapping example of, 70 –73

segregating into Bounded Contexts, 20

Ports, using with DDD, 41 –42

POST operation, RESTful HTTP, 63 –65

Problem space

Bounded Contexts in, 12

Event Storming advantages for, 114

overview of, 12

using Subdomains for discussing, 47

Process, Event Storming of business, 117

Product owner, Scrum, 27 , 119

Properties, Domain Event, 103 –104

Published Language

in Context Mapping, 58

integrating bounded contexts via, 67

RESTful HTTP using, 63

RPC with SOAP using, 62

PUT operation, RESTful HTTP, 63 –65

Q

Query-back trade-offs, Domain Events, 71 –72

R

Rapid design. See Event Storming

Reactive Model, using with DDD, 43

Reference by identity only, Aggregates, 84 –85

References, used in this book, 137 –138

Remote Procedure Calls (RPC) with SOAP, 61 –63

Representational State Transfer (REST), 43 , 65

Request-Response communications, messaging, 69 –70

REST in Practice (RIP), 63 –65

REST (Representational State Transfer), 43 , 65

RESTful HTTP, 63 –65 , 72

Roads, modeling of, 6

Robustness, RPC lacking, 62

Roles, identifying for users in Event Storming, 123 –124

Root Entity, Aggregate

defined, 78

implementing Aggregate design, 90 –91

right-sizing, 95

RPC (Remote Procedure Calls) with SOAP, 61 –63

S

Scenarios

developing Ubiquitous Language as, 35 –38

implementing DDD on Agile Project, 133 –134

include Domain Experts in, 134 –136

putting to work, 38 –40

Scrum

criticisms of, 125 –126

DDD Domain Expert vs. product owner in, 27

good, bad and effective design in, 3 –7

managing project. See Managing DDD on Agile Project

Semantic contextual boundaries, Bounded Contexts, 12

Separate Ways Context Mapping, 58

Service-Oriented Architecture (SOA), 43

Services, Open Host Service, 57

Shared Kernel Context Mapping, 55

Simple Object Access Protocol (SOAP), using RPC with, 61 –63

Single Responsibility Principle (SRP), Aggregates, 84

Size. See Boundaries, Aggregate

Snapshots, of Aggregate performance, 109

SOA (Service-Oriented Architecture), 43

SOAP (Simple Object Access Protocol), using RPC with, 61 –63

Software developers

developing Ubiquitous Language as scenarios, 35 –41

Domain Experts vs., 26 –29

finding good, 126

rapid design for. See Event Storming

Solution space

Bounded Contexts used in, 12

overview of, 12

segregating Subdomain in, 50

Source code repositories, for Bounded Contexts, 14

Specification (Adzic), 124

Specification by Example, refining Ubiquitous Language, 39

Sprints

accuracy of long-term estimates for, 131

identifying tasks/estimating effort, 130

incurring modeling debt during, 128 –129

SRP (Single Responsibility Principle), Aggregates, 84

Stakeholders, software design vs., 4 –5

Sticky notes, Event Storming

associate Entity/Aggregate to Command, 121 –122

create Commands causing Domain Events, 118 –120

defined, 113

Domain Events for business process, 116 –117

identifying roles for users, 124

overview of, 115 –116

showing flow on modeling surface, 123

Storage, referencing Aggregates by identity for, 85

Strategic design

architectural components, 41 –43

Bounded Contexts in, 11 –17

case study, 21 –24

challenging assumptions/unifying mental models, 29 –34

with Context Mapping. See Context Mapping

Domain Experts and business drivers in, 17 –20

focus on business complexity, 28

fundamental need for, 25 –29

with Subdomains. See Subdomains

summary, 43

Ubiquitous Language in, 11 –17 , 34 –41

understanding, 7 –8

Strengths, identifying Agile Project, 127 –128

Subdomains

for complexity, 47 –50

overview of, 45 –46

showing flow in Event Storming, 122 –123

strategic design with, 7 –8

summary, 50

types of, 46 –47

understanding, 46

Supplies, for Event Storming, 115 –116

Supporting Domain, 47 , 50

SWOT (Strengths, Weaknesses, Opportunities, and Threats) analysis, Agile Projects, 127 –128

T

Tactical design

with Aggregates. See Aggregates

with Domain Events. See Domain Events

understanding, 8 –9

Taskboard shuffle

project estimates/use of, 5

software design vs., 3 –4

tendency to design using, 126

Tasks

identifying/estimating in Agile Project, 129 –131

timeboxed modeling of, 132 –133

Teams

assigning to each Bounded Context, 14

Conformist relationship between, 56

Context Mapping integrating, 53

Customer-Supplier relationship between, 55 –56

Event Storming advantages for, 113 –114

Partnership relationship between, 54

Shared Kernel relationship between, 55

Ubiquitous Language spoken within, 13 –14

Technology

Context Mapping integrating, 53

keeping domain model free of, 42

modeling Aggregates, 90

software design vs., 4 –5

Testing

as benefit of Bounded Contexts, 25

designing Aggregrates for, 97 –98

implementing DDD on Agile Project, 134

using Domain Experts in, 136

validating domain model, 39 –40

Threats, identifying Agile Project, 127 –128

Timeline control, Scrum for, 4 –5

Transactional consistency boundary, Aggregates, 78 –81

Transactions, Aggregates, 78 –81 , 83 –84

U

Ubiquitous Language

advantages of Event Storming, 113

in Anticorruption Layer Context Mapping relationship, 56 –57

challenging/unifying mental models to create, 29 –34

in Conformist Context Mapping relationship, 56

for Core Domain, 46 –47

developing, 34 –41

developing by collaborative feedback loop, 29

as fundamental strategic design tool, 25 –29

maintenance phase of, 40 –41

modeling abstractions for Aggregates, 93 –95

modeling Aggregates, 93

naming Domain Event types, 101 –102

in strategic design, 7

understanding, 11 , 13 –14

using Domain Experts to refine, 134 –136

Ubiquitous Languages

integrating different, 53

Separate Ways Context Mapping and, 58

translating with Published Languages, 58

UML (Unified Modeling Language), 90 , 112 –113

Unbounded legacy systems, complexity of, 48

Underwriting, Context Mapping example, 70 –73

Underwriting policy, 19 –20

Unit testing, 40 , 97 –98

Updates, Aggregate, 85 –88 , 96 –97

User interface, abstractions for Aggregates, 94

User role, Event Storming, 119

User Story Mapping, Event Storming, 124

User Story Mapping (Patton), 124

V

Value Objects, and Aggregates, 77 , 91

Views, for users in Event Storming, 123 –124

W

Wall, conducting Event Storming on, 115

Weaknesses, identifying Agile Project, 127 –128

Whack-a-mole issues, Big Ball of Mud, 59

Who? in Ubiquitous Language development, 36 –38

Work in progress (WIP)

accuracy of long-term estimates for, 131

identifying tasks/estimating effort, 130

incurring modeling debt during, 128 –129

sprints as, 126