← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2299.h.1.a.1.b

裁剪接口不必改原组件

理解等级:中级

接口裁剪在不修改原API与实现的前提下,通过过滤、包装或织入增加转换、校验、缓冲,或按上下文隐藏能力。它能统一跨服务功能和部分语法数据差异;若要维护复杂状态来协调协议,就已接近引入完整中介。应明确裁剪位置和所改语义,防止隐形处理造成误解。

相关:[[封装不能消除质量依赖]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 可集成性 · 查看原书依据

      Tailoring an interface is a tactic that adds capabilities to, or hides capabilities in, an existing interface without changing the API or implementation. Capabilities such as translation, buffering, and data smoothing can be added to an interface without changing it.

    参考来源

    - 位置:《Software Architecture in Practice, 4th Edition》第7章《可集成性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch07.html) - 结论依据:原文的定义、机制或比较支持“接口裁剪在不修改原API与实现的前提下,通过过滤、包装或织入增加转换、校验、缓冲,或按上下文隐藏能力”;正文保留其条件与取舍。 - 原始内容:Tailoring an interface is a tactic that adds capabilities to, or hides capabilities in, an existing interface without changing the API or implementation. Capabilities such as translation, buffering, and data smoothing can be added to an interface without changing it.