知识卡片
依赖必须无环
提供者供给资源,消费者引用并使用它们。沿提供关系追踪不应形成环,即提供者不能再依赖其直接或间接消费者。无环关系使供给顺序、独立测试和变更方向更清楚;把相互需要的部分硬拆成两个组件,可能反而暴露边界设计问题。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 基础设施代码设计原则 · 查看原书依据
As you trace relationships from a component that provides resources to consumers, you should never find a loop (or cycle). In other words, a provider component should never consume resources from one of its own direct or indirect consumers. Management of Interfaces Between Components A dependency between two components should be explicitly defined as an
参考来源
- 位置:《Infrastructure As Code》第5章《基础设施代码设计原则》(来源项目 book-sources,源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch05.html)
- 结论依据:原文对该概念的定义、应用条件与作用机制直接支持上述解释。
- 原始内容:As you trace relationships from a component that provides resources to consumers, you should never find a loop (or cycle). In other words, a provider component should never consume resources from one of its own direct or indirect consumers. Management of Interfaces Between Components A dependency between two components should be explicitly defined as an