知识卡片
紧耦合依赖实现细节
当一个组件依赖另一个组件的内部实现细节时,两者形成紧耦合。单体代码库中跨子域直接复用实现很方便,也容易让这种依赖扩散。判断耦合程度应看变更是否会牵动调用方,而不能只看组件是否位于同一个仓库。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 1 章《What are microservice APIs?》(源文件:_epub-src/OEBPS/Text/01.htm)
- 结论依据:1.1.2 节先指出同一项目中跨子域复用代码容易造成紧耦合,再把紧耦合明确定义为组件依赖另一部分代码的实现细节。
- 原始内容:Additionally, being able to reuse code from other subdomains within the same project often leads to tight coupling among components. Tight coupling happens when a component depends on the implementation details of another piece of code.