领域驱动设计 (Domain-Driven Design,DDD) 是一种软件设计方法,专注于将软件建模与业务领域紧密匹配——强调与领域专家合作、使用统一语言,以及明确定义的领域模型和边界。它对复杂的业务领域特别有价值。
DDD 的核心思想
DDD centers the design on the BUSINESS DOMAIN (the real-world problem):
✓ UBIQUITOUS LANGUAGE → a shared, precise vocabulary between developers and domain
EXPERTS, used consistently in code AND conversation (reduces miscommunication)
✓ MODEL the domain → rich domain models reflecting real business concepts/rules (not
just data structures) — the model captures the business logic
✓ collaborate with domain EXPERTS → deeply understand the domain to model it well
