← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1841.h.1.a.1.a.3.f.1.b.1

契约只传必要知识

理解等级:中级

消费者只需要名称时,不应在契约中强制包含整个客户实体。整对象耦合会让无关字段变化也触发协调。保持必要知识范围能降低脆弱性,但不等于完全没有模式;应明确必需字段、兼容变更及验证手段。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Evolutionary Architecture Topologies · 查看原书依据

      Keeping contracts at a “need to know” level strikes a balance between semantic coupling and necessary information without creating needless fragility in integration architecture. At the far end of the spectrum of contract coupling lie extremely loose contracts, often expressed as name/value pairs in formats like YAML and JSON, illustrated in Example 5-4. Example 5-4. Name/value pairs in JSON {

    参考来源

    - 位置:《Building Evolutionary Architectures Automated Software Governance, 2nd Edition》第05章《Evolutionary Architecture Topologies》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Evolutionary Architectures Automated Software Governance, 2nd Edition/_epub-src/OEBPS/ch05.html;段落定位:Keeping contracts at a “need to know” level) - 结论依据:原文对“契约只传必要知识”的定义或案例,支撑“消费者只需要名称时,不应在契约中强制包含整个客户实体”的归纳。据其上下文,整对象耦合会让无关字段变化也触发协调。 - 原始内容:Keeping contracts at a “need to know” level strikes a balance between semantic coupling and necessary information without creating needless fragility in integration architecture. At the far end of the spectrum of contract coupling lie extremely loose contracts, often expressed as name/value pairs in formats like YAML and JSON, illustrated in Example 5-4. Example 5-4. Name/value pairs in JSON {