知识卡片

普通读书笔记卡 · 3284.b

过细函数会提高编排耦合

理解等级:高级

函数式架构可适用于事件驱动任务,但若每个函数只做过于细碎的动作,交付一个业务价值就得编排许多函数。复用性增加未必抵得上维护与协调成本,应按业务动作而非最小代码片段决定函数粒度。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The biggest challenge with designing a function-based system and the corresponding APIs is typically related to getting coupling correct. It’s all too easy to design functions or services that are so simplistic that many of them have to be orchestrated together to provide any business value. These services and their APIs tend then to become highly coupled. The balance here between reusability and maintainability can

    参考来源

    - 位置:《Mastering API Architecture》第8章《Redesigning Applications to API-Driven Architectures》之《Functions》(源文件:_epub-src/OEBPS/ch08.xhtml) - 结论依据:原文指出函数过于简单会迫使大量编排,服务与 API 反而紧耦合。 - 原始内容:The biggest challenge with designing a function-based system and the corresponding APIs is typically related to getting coupling correct. It’s all too easy to design functions or services that are so simplistic that many of them have to be orchestrated together to provide any business value. These services and their APIs tend then to become highly coupled. The balance here between reusability and maintainability can