Expert guidance for Domain-Driven Design architecture and implementation...
DDD manages complexity through alignment between software and business reality. Strategic design (boundaries, language, subdomains) provides more value than tactical patterns (aggregates, repositories).
Apply DDD when:
DDD is overkill when:
See WORKFLOW.md for detailed step-by-step instructions for each phase.
| Type | Investment | Example |
|---|---|---|
| Core | Maximum - competitive advantage | Recommendation engine, trading logic |
| Supporting | Custom but quality tradeoffs OK | Inventory management |
| Generic | Buy/outsource | Auth, email, payments |
Customer, OrderMoney, Address, EmailDefault to value objects. Only use entities when identity matters.
Start with modular monolith when:
├── Team < 20 developers
├── Domain boundaries unclear
├── Time-to-market critical
└── Strong consistency required
Consider microservices when:
├── Bounded contexts have distinct languages
├── Teams can own full contexts
├── Independent scaling required
└── DevOps maturity exists
| Need | Skill |
|---|---|
| Data layer implementation | spring-boot-data-ddd — JPA/JDBC aggregates, repositories, transactions |
| REST API layer | spring-boot-web-api — Controllers, validation, exception handling |
| Module boundaries | spring-boot-modulith — Module structure, event-driven communication |
| Testing patterns | spring-boot-testing — Aggregate tests, module tests, Scenario API |
| Security for domains | spring-boot-security — Method-level authorization, role-based access |