知识卡片

普通读书笔记卡 · 3333.c

公开接口限定服务耦合

理解等级:高级

新建报表服务若通过原服务公开 API 取得资料,依赖会限定在显式接口,而不是共享数据库结构;这保留了数据所有权边界。新服务同时增加运维和维护负担,故隔离收益仍需与新增复杂度比较。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [21116:25342)) - 结论依据:原文以报表服务调用档案服务公开 API 为例,比较显式接口与共享数据库的数据耦合,并紧接着说明新服务的维护代价。 - 原始内容:This approach is classic Service Oriented Architecture (SOA). Coupling is limited to the published API, not indirectly via data structures or directly via sharing the same databases. Sharing the API may seem like the obvious choice, but every decision has tradeoffs.