知识卡片
模块提供两层阅读视角
模块让人以两种尺度阅读模型:进入一个模块时查看对象细节,退到模块之间时只看大块之间的关系。这样一次只需处理有限概念;若跨模块关系过多,理解一处就得不断展开别处,认知负担随之增加。模块应是团队能以业务语言讨论的概念块,而不只是文件目录。具体划分原则参见[[模块划分应表达领域概念]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第05章|Modules (a.k.a. Packages) · 查看原书依据
MODULES give people two views of the model: They can look at detail within a MODULE without being overwhelmed by the whole, or they can look at relationships between MODULES in views that exclude interior detail.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第41章《原书第05章|Modules (a.k.a. Packages)》(源文件:_epub-src/0321125215_ch05lev1sec5.html)
- 结论依据:原文以认知负荷解释模块化,明确低耦合和高内聚适用于概念关系,要求模块讲述领域故事、命名进入通用语言。
- 原始内容:M ODULES give people two views of the model: They can look at detail within a MODULE without being overwhelmed by the whole, or they can look at relationships between MODULES in views that exclude interior detail. ... There is a limit to how many things a person can think about at once (hence low coupling). Incoherent fragments of ideas are as hard to understand as an undifferentiated soup of ideas (hence high cohesion).