知识卡片
协同性描述变更必须联动的耦合
两个组件存在协同性(connascence),意味着改动其中一个后,另一个也必须相应修改,系统才能保持正确。它给耦合类型命名,而不是像 Ca、Ce 一样只数入边和出边。
原书分静态与动态:静态依赖可从源码看到,例如共同约定名称、类型、含义、位置或算法;动态依赖在运行时显现,例如执行顺序、时机、数值联动或同一实体身份。若把调用参数顺序弄反,即使类型相同也可能违背语义,这是原书位置协同性例子。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Modularity · 查看原书依据
Two components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system.
参考来源
- 位置:《Fundamentals of Software Architecture》第05章《Modularity》(源文件:`OEBPS/ch03.html`,Connascence)
- 结论依据:原文定义协同性、区分静态和动态两组类型,并以 `updateSeat` 同类型参数错位说明位置协同性。
- 原始内容:Two components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system.