← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1903.c.1.b.3.a.2.b

接口契约显化依赖

理解等级:中级

组件应明确声明它需要与提供什么,团队共同维护输出、命名或标签等接口约定。日志组件暗用容器团队子网,后者重构时不知存在消费者而导致中断,说明“碰巧可用”的内部资源不是可靠契约。接口显式化让提供方了解承诺,也让消费者知道受支持的使用方式。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 基础设施代码设计原则 · 查看原书依据

      A dependency between two components should be explicitly defined as an interface. Building an infrastructure system without giving much thought to the dependencies usually leads to brittle implementations and tight coupling. Making a change to one part of the infrastructure can have a chain of effects on other parts that is difficult to untangle. Effective

    参考来源

    - 位置:《Infrastructure As Code》第5章《基础设施代码设计原则》(来源项目 book-sources,源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch05.html) - 结论依据:原文对该概念的定义、应用条件与作用机制直接支持上述解释。 - 原始内容:A dependency between two components should be explicitly defined as an interface. Building an infrastructure system without giving much thought to the dependencies usually leads to brittle implementations and tight coupling. Making a change to one part of the infrastructure can have a chain of effects on other parts that is difficult to untangle. Effective