← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2313.e.5.f.10.b.3.k.1.b

接口隔离减少无用依赖

理解等级:中级

接口隔离按客户端所需能力设计接口,避免调用者因不使用的功能变化而被迫修改。商品服务可为不同使用者提供聚焦接口;重点在依赖范围,不是把每个方法都拆成独立网络服务。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Design for Speed and Efficiency · 查看原书依据

      The Interface Segregation Principle (ISP) states that clients should not be forced to depend on interfaces they do not use. In a serverless architecture, this principle can be applied by designing function interfaces that are focused and specific to the needs of the clients consuming them.

    参考来源

    - 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第05章《Design for Speed and Efficiency》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch05.xhtml) - 结论依据:原文的机制或对比支持以下核心判断:接口隔离按客户端所需能力设计接口,避免调用者因不使用的功能变化而被迫修改。 本卡将相邻说明中的适用限制保留为解释。 - 原始内容:The Interface Segregation Principle (ISP) states that clients should not be forced to depend on interfaces they do not use. In a serverless architecture, this principle can be applied by designing function interfaces that are focused and specific to the needs of the clients consuming them.