Module 3: Domain-Driven Design & Bounded Contexts: Guided Labs
Lab 1: Event-Storming Session
Map domain events, commands, actors, policies, hotspots, and external systems for a real workflow. Preserve disagreements instead of smoothing them over. Cluster events into candidate boundaries and state the evidence for each boundary.
Lab 2: Context Map and Language Test
Create a context map with upstream/downstream direction and relationship type. Build a glossary per context. Find three overloaded terms and show why one shared model would be harmful.
Lab 3: Aggregate Invariant Harness
Implement one aggregate with command methods and invariant tests. Attempt to put a second context’s state inside it, then refactor to asynchronous coordination with explicit intermediate states.
Lab 4: Anti-Corruption Layer
Translate a hostile legacy or partner schema into the domain model. Test unknown codes, missing fields, version drift, and partial failure. Keep external types out of the core package.
Evidence: event map, context map, glossary, invariant tests, and translation contract tests.