Two of the six modules of the @DDDBE meetup on Strategic Domain-Driven Design on June 10, 2014 at Stack & Heap
1. Bounded Contexts 2. Modelling
More at http://verraes.net/ or http://twitter.com/mathiasverraes
DDD Basics - Kortrijk EditionJune 10, 2014 - Belgium@DDDBE — http://domaindriven.be
View Slide
Kindly hosted by
We’ve got some great(international) speakers,but we need locations!ping@DDDBEhttp://domaindriven.be
Aspects ofDomain-Driven Design
Tactical DDD!design patterns
Collaborative DDD!model storming
Strategic DDD!complexity, scale
Defining DDD (Yves)Ubiquitous Language (Jef)Bounded Contexts (Mathias)Context Mapping (Stijn)Modelling (Mathias)Starting/Selling DDD (Tom)Q&A / Lean Coffee
Bounded Contexts
“When somethingis wrong,something istoo big.”— Leopold Kohr
Large complex systems:harder to reason about
Large complex systems:your mental model!=my mental model
Large complex systems:subtle nuancesin meaning
Avoid a big unifiedcentralised model.
Classic example:What is a product?
Split intoBounded Contexts
Make Bounded Contextexplicitpureindependentconsistent within itsboundary
Benefits:claritymodel integrityfreedom toevolve separately
Drawbacks:short term conveniencechoosing the boundarieshow big is the problem?
Tricks
Inspired bydepartmentsteamslife cyclesbusiness processes
What if this was anoff-the-shelf solution?
How muchcommunication goes onbetween BoundedContexts?
Visualize!!Context MappingModel Storming
Modelling
Structural modellingdescribes state
Structural modellinginspired bypersistence concerns
RelationalNormalisedCRUDAnaemic
“CRUD is ourindustry’sgrand failure.”— Greg Young
Ask your Domain ExpertaboutState Changes!
Why does it change?When does it change?How often?Who causes it?By which rules?What consequences?
!!The moving parts aremore interesting than thestable parts
!!A Domain Modelis about:
state + structurebehaviour + changetemporalroles + actorsbusiness rules + invariantscausality + correlationinteractionprocessesworkflows + transitionsintention + consequencefailure …
Modelling:Make the implicit explicit
example!Intentions:Command ObjectsConsequences:Domain Events
IntentionProtectionInterpretationAutomationuser sends Commandsmanage processesdomain model sends Events, guards consistencycreate read modelsfrom EventsDTOCommandsEvents
@mathiasverraeshttp://verraes.net