知识卡片
业务接口隐藏存储决定
信息隐藏是把易变的实现决定隔离在稳定接口之后。对 API 来说,端点和数据应表达业务领域,而非直接暴露底层库表结构;否则换存储时,提供方只能维护复杂翻译层或协调所有调用方迁移。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 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