知识卡片

普通读书笔记卡 · 3332.f

兼容旧契约有边界

理解等级:高级

如果旧契约泄漏数据库序列号等实现细节,强行兼容会限制新存储设计。评估时须区分能内部修复的技术债和必须修改公开契约的问题,后者应规划消费者迁移而非无限保留缺陷。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第5章《Assessments》(源文件:`_epub-src/OPS/ch05.xhtml`,归一化正文 [33593:37759)) - 结论依据:原文指出糟糕或泄漏实现的契约会约束迁移,以数据库序列号替换为实现中立标识为例。 - 原始内容:Problem with the contract : Obviously, you can’t significantly change the contract if you want to preserve backwards compatibility. If it is a poor contract, you are stuck with it. Leaky contract implementation : Let’s say your contracts leaks implementation details, such as the direct use of a sequence number from your database instead of an implementation neutral GUID. You could struggle to keep supporting the sequence number if you want to change the database implementation.