知识卡片
分层API可能放大跨层改动
按展示、应用、领域和数据层组织 API,能复用同层能力,却可能让一个端到端业务变化同时修改多层。若为避开多跳而复制逻辑或绕过层次,架构就失去原有约束;应按业务能力衡量跨层耦合。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
idea was that each user request entering an application flowed sequentially down and then up of each tier/layer. This pattern allowed for the abstraction and reuse of functionality specific to each tier, with the trade-off being that an end-to-end slice of functionality often required modifying many layers—i.e., cohesion within each tier’s layer came at the expense of high coupling of tiers to provide a unit
参考来源
- 位置:《Mastering API Architecture》第8章《Redesigning Applications to API-Driven Architectures》之《API Layer Cake》(源文件:_epub-src/OEBPS/ch08.xhtml)
- 结论依据:原文指出分层内聚带来的跨层高耦合,并描述重复功能与绕层访问的常见退化。
- 原始内容:idea was that each user request entering an application flowed sequentially down and then up of each tier/layer. This pattern allowed for the abstraction and reuse of functionality specific to each tier, with the trade-off being that an end-to-end slice of functionality often required modifying many layers—i.e., cohesion within each tier’s layer came at the expense of high coupling of tiers to provide a unit