知识卡片
通用子域优先复用成熟模型
“复用”可发生在模型层,不必先追求代码复用。若已有广泛使用且文档充分的分析模式,或会计、物理那样形式化的模型,可选符合需求的自洽子集,减少重新发明和培训成本。
这并不要求把发布模型的全部能力实现,也不保证现成模型完全适合本项目;仍需验证概念边界与接口。通用子域可借外部设计知识,核心域则要保留团队自己的专门理解。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第15章|Generic Subdomains · 查看原书依据
Don't feel compelled to implement all aspects of a published model, if you can identify a simplified subset that is self-consistent and satisfies your needs. But in cases where there is a well-traveled and well-documentedor better yet, formalizedmodel available, it makes no sense to reinvent the wheel.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第119章《Generic Subdomains》(源文件:_epub-src/0321125215_ch15lev1sec3.html;单元02、04)
- 结论依据:原文推荐通用子域利用公开、严谨的成熟模型,并允许只实现自洽且满足需求的子集。
- 原始内容:Don't feel compelled to implement all aspects of a published model, if you can identify a simplified subset that is self-consistent and satisfies your needs. But in cases where there is a well-traveled and well-documentedor better yet, formalizedmodel available, it makes no sense to reinvent the wheel.