知识卡片

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

开放主机服务复用共同集成协议

理解等级:高级

一个子系统要接入许多外部系统时,逐个定制翻译器会增加维护负担。若自身能力能整理成连贯的服务集合,可发布所有客户都能使用的开放协议,并随共同需求扩展它。某个客户的特殊需求则用一次性翻译器补充,避免污染共享协议。

设计多团队可理解的协议成本较高;接入次数少或服务能力缺乏内聚性时,逐个翻译反而可能更划算。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第14章|Open Host Service · 查看原书依据

      Define a protocol that gives access to your subsystem as a set of SERVICES. Open the protocol so that all who need to integrate with you can use it. Enhance and expand the protocol to handle new integration requirements, except when a single team has idiosyncratic needs. Then, use a one-off translator to augment the protocol for that special case so that the shared protocol can stay simple and coherent.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第111章《Open Host Service》(源文件:_epub-src/0321125215_ch14lev1sec10.html;单元01) - 结论依据:原文要求以服务集合开放协议,通用需求进协议,个别特殊需求由一次性翻译器承接。 - 原始内容:Define a protocol that gives access to your subsystem as a set of SERVICES . Open the protocol so that all who need to integrate with you can use it. Enhance and expand the protocol to handle new integration requirements, except when a single team has idiosyncratic needs. Then, use a one-off translator to augment the protocol for that special case so that the shared protocol can stay simple and coherent.