知识卡片

普通读书笔记卡 · 1340.f.2

废弃版本扩展是不同演进

理解等级:高级

废弃要提前通知和给出退出安排;版本并存让调用者显式选择旧新契约;扩展保留旧资源再加新能力。若新内部表示与旧假设冲突,可用中介翻译,例如拆出地址中的房号字段。新增资源也意味着长期维护承诺,不能仅因“只加没删”就假定绝无兼容风险。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 软件接口 · 查看原书依据

      Three techniques can be used to change an interface: deprecation, versioning, and extension. • Deprecation. Deprecation means removing an interface. Best practice when deprecating an interface is to give extensive notice to the actors of the element.

    参考来源

    - 位置:《Software Architecture in Practice, 4th Edition》第15章《软件接口》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch15.html) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:Three techniques can be used to change an interface: deprecation, versioning, and extension. • Deprecation. Deprecation means removing an interface. Best practice when deprecating an interface is to give extensive notice to the actors of the element.