知识卡片

普通读书笔记卡 · 1971.o.1.b.1.a.2.c.1.b.2.c.1

上游不可协商时先重算依赖收益

理解等级:高级

面对不愿配合的上游,下游先评估继续依赖的价值与成本,不假设上游会按自己需要修改。若依赖不值,可以选择分开发展;若必须保留依赖,且上游模型难以直接使用,下游就要维护自己的模型并承担复杂翻译层的成本。

这是原书在本段提出的可行路径,是否顺从上游模型还取决于下一段讨论的上游设计质量与适配代价;不应把“必须依赖”直接等同于“必须照搬”。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第14章|Conformist · 查看原书依据

      In this situation, there are three possible paths. One is to abandon use of the upstream altogether. This option should be evaluated realistically, making no assumptions that the upstream will accommodate downstream needs. Sometimes we overestimate the value or underestimate the cost of such a dependency. If the downstream team decides to cut the strings, they are going their SEPARATE WAYS (see the pattern description later in this chapter). Sometimes the value of using the upstream software is so great that the dependency has to be maintained (or a political decision has been made that the team cannot change). In this case, two paths remain open; the choice depends on the quality and style of the up-stream design. If the design is very difficult to work with, perhaps for lack of encapsulation, awkward abstractions, or modeling in a paradigm the team cannot use, then the downstream team will still need to develop its own model. They will have to take full responsibility for a translation layer that is likely to be complex.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第107章《Conformist》(源文件:_epub-src/0321125215_ch14lev1sec7_split_000.html;单元01) - 结论依据:原文提出先现实评估是否脱离上游;无法脱离且上游设计难用时,下游自建模型和翻译层。 - 原始内容:In this situation, there are three possible paths. One is to abandon use of the upstream altogether. This option should be evaluated realistically, making no assumptions that the upstream will accommodate downstream needs. Sometimes we overestimate the value or underestimate the cost of such a dependency. If the downstream team decides to cut the strings, they are going their SEPARATE WAYS (see the pattern description later in this chapter). Sometimes the value of using the upstream software is so great that the dependency has to be maintained (or a political decision has been made that the team cannot change). In this case, two paths remain open; the choice depends on the quality and style of the up-stream design. If the design is very difficult to work with, perhaps for lack of encapsulation, awkward abstractions, or modeling in a paradigm the team cannot use, then the downstream team will still need to develop its own model. They will have to take full responsibility for a translation layer that is likely to be complex.