← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3281.b

业务接口隐藏存储决定

理解等级:中级

信息隐藏是把易变的实现决定隔离在稳定接口之后。对 API 来说,端点和数据应表达业务领域,而非直接暴露底层库表结构;否则换存储时,提供方只能维护复杂翻译层或协调所有调用方迁移。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The protection involves providing a stable interface that protects the remainder of the system from the underlying (changeable) implementation. In regards to APIs, information hiding is the ability to prevent certain aspects of a provider being accessible to its consumers This can be achieved by using only business- or domain-focused API endpoints and by not leaking any of the internal abstractions or the implementation-specific data

    参考来源

    - 位置:《Mastering API Architecture》第8章《Redesigning Applications to API-Driven Architectures》之《Case Study: Establishing Attendee Domain Boundaries》(源文件:_epub-src/OEBPS/ch08.xhtml) - 结论依据:原文用 Attendee 服务更换存储的案例解释信息隐藏,并要求业务端点不泄露内部模式。 - 原始内容:The protection involves providing a stable interface that protects the remainder of the system from the underlying (changeable) implementation. In regards to APIs, information hiding is the ability to prevent certain aspects of a provider being accessible to its consumers This can be achieved by using only business- or domain-focused API endpoints and by not leaking any of the internal abstractions or the implementation-specific data