知识卡片
变化传播揭示内聚耦合
耦合描述改动从一个模块传播到另一个的可能,内聚描述模块内职责受同类场景共同影响的程度。高内聚让相关变化集中,低耦合减少跨边界牵动;模块过大也使修改和验证昂贵。连同绑定时间,这四项解释修改成本;单看目录大小或依赖数量都不足以判断。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 可修改性 · 查看原书依据
Cohesion measures how strongly the responsibilities of a module are related. Informally, it measures the module’s “unity of purpose.” Unity of purpose can be measured by the change scenarios that affect a module.
参考来源
- 位置:《Software Architecture in Practice, 4th Edition》第8章《可修改性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch08.html)
- 结论依据:原文的定义、机制或比较支持“耦合描述改动从一个模块传播到另一个的可能,内聚描述模块内职责受同类场景共同影响的程度”;正文保留其条件与取舍。
- 原始内容:Cohesion measures how strongly the responsibilities of a module are related. Informally, it measures the module’s “unity of purpose.” Unity of purpose can be measured by the change scenarios that affect a module.