← 返回起始笔记位置

知识卡片

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

通信链路位置不改变防腐层职责

理解等级:高级

两套系统可能分属不同进程或服务器,但通信链路放在本地服务与防腐层之间、适配器与门面之间,还是门面与外部系统之间,取决于部署权限和接口便利性。

这些位置属于实现与部署选择;防腐层的概念职责始终是隔离并翻译两套模型。把“用了远程调用”当成已建立防腐层,会漏掉最重要的语义边界。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      There also will be cases where the entire ANTICORRUPTION LAYER can live with the other subsystem, placing communication links or distribution mechanisms between your subsystem and the SERVICES that make up the ANTICORRUPTION LAYER's interface.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第109章《Anticorruption Layer》(源文件:_epub-src/0321125215_ch14lev1sec8.html;单元01–03) - 结论依据:原文列出多种通信链路部署位置,并明确这些选择不影响防腐层的概念作用。 - 原始内容:But such details shouldn't be confused with an ANTICORRUPTION LAYER , which is not a mechanism for sending messages to another system. Rather, it is a mechanism that translates conceptual objects and actions from one model and protocol to another. [...] You'll usually need some communications mechanism to connect the two subsystems, and they could well be on separate servers. In this case, you have to decide where to place these communication links. If you have no access to the other subsystem, you may have to put the links between the FACADE and the other subsystem. However, if the FACADE can be integrated directly with the other subsystem, then a good option is to put the communication link between the ADAPTER and FACADE , because the protocol of the FACADE is presumably simpler than what it covers. There also will be cases where the entire ANTICORRUPTION LAYER can live with the other subsystem, placing communication links or distribution mechanisms between your subsystem and the SERVICES that make up the ANTICORRUPTION LAYER 's interface. These are implementation and deployment decisions to be made pragmatically. They have no bearing on the conceptual role of the ANTICORRUPTION LAYER .