知识卡片

普通读书笔记卡 · 4545.d.6

耦合程度看变更传播

理解等级:中级

组件不可避免地知道一部分彼此信息,关键是哪些变化会迫使对方一起修改。依赖稳定抽象通常比依赖内部表结构或具体实现更能隔离变化,但也增加设计与运行成本。松耦合不等于消除全部依赖;应围绕预期变化决定值得保护的边界。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Loose Coupling · 查看原书依据

      ask how many and what kind of changes can be made to one component without adversely affecting another. Note Some amount of coupling is inevitable, and isn’t necessarily a bad thing, especially in early days of a system. It’s always temping to over-abstract and over-complicate, and premature optimization is still the root of all evil.

    参考来源

    - 位置:《Cloud Native Go》第08章《Loose Coupling》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch08.xhtml) - 结论依据:组件不可避免地知道一部分彼此信息,关键是哪些变化会迫使对方一起修改。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:ask how many and what kind of changes can be made to one component without adversely affecting another. Note Some amount of coupling is inevitable, and isn’t necessarily a bad thing, especially in early days of a system. It’s always temping to over-abstract and over-complicate, and premature optimization is still the root of all evil.