tadata
Back to home

Domain-Driven Design: From Strategic Thinking to Bounded Contexts

#architecture#ddd#microservices#software-design

Domain-Driven Design (DDD) is not a framework or a library. It is a set of principles for structuring software around business domains. In 2026, DDD remains the most reliable methodology for decomposing complex systems, especially when planning microservice boundaries.

DDD Concept Taxonomy

Domain-Driven Design
├── Strategic Design
│   ├── Bounded Context
│   ├── Ubiquitous Language
│   ├── Context Mapping
│   ├── Core / Supporting / Generic Subdomains
│   └── Domain Vision Statement
├── Tactical Design
│   ├── Entities
│   ├── Value Objects
│   ├── Aggregates (+ Aggregate Root)
│   ├── Domain Events
│   ├── Repositories
│   ├── Factories
│   └── Domain Services
└── Integration Patterns
    ├── Anti-Corruption Layer (ACL)
    ├── Shared Kernel
    ├── Open Host Service
    ├── Published Language
    └── Customer-Supplier

Strategic vs Tactical Patterns

AspectStrategic PatternsTactical Patterns
ScopeSystem-wide, cross-teamWithin a single bounded context
StakeholdersArchitects, PMs, domain expertsDevelopers, tech leads
OutputContext maps, team boundariesCode structure, domain model
When to applyBefore building anythingDuring implementation
Risk of skippingWrong service boundaries, expensive reworkAnemic domain model, logic leaks
EffortWorkshops, EventStorming sessionsContinuous refactoring
ReversibilityLow (organizational impact)Medium (code-level changes)

Context Mapping Diagram

┌──────────────┐    Shared Kernel    ┌──────────────┐
│   Identity   │◄───────────────────►│   Billing    │
│   Context    │                     │   Context    │
└──────┬───────┘                     └──────┬───────┘
       │ Open Host / Published Language      │ Customer-Supplier
       │                                     │
┌──────▼───────┐   Anti-Corruption   ┌──────▼───────┐
│   Catalog    │   Layer (ACL)       │   Shipping   │
│   Context    │◄════════════════════│   Context    │
└──────────────┘                     └──────────────┘
       │ Conformist                         │
       │                                    │
┌──────▼───────┐                     ┌──────▼───────┐
│  3rd-Party   │                     │  Warehouse   │
│  Search API  │                     │   Context    │
└──────────────┘                     └──────────────┘

Bounded Context Identification Checklist

#QuestionSignal
1Does this area have its own vocabulary?Different terms = different context
2Would a different team own this?Organizational alignment matters
3Does it have a distinct lifecycle?Deploy independently = separate context
4Do data consistency rules differ?Strong vs eventual consistency
5Is there a natural transaction boundary?Aggregate boundaries indicate contexts
6Would changing this break unrelated features?Coupling signal
7Does this subdomain provide competitive advantage?Core vs supporting vs generic
8Are there different read/write patterns?CQRS candidate within the context

Common Pitfalls

Entity obsession -- Teams model everything as an Entity when Value Objects are simpler and safer. If two objects with the same attributes are interchangeable, use a Value Object.

Ignoring strategic design -- Jumping straight to Aggregates and Repositories without mapping contexts leads to a distributed monolith. Strategic design is not optional.

One model to rule them all -- A "Customer" in billing is not the same as a "Customer" in shipping. Let each context own its own model of shared concepts.

Resources