← 返回刚才阅读的位置

知识卡片

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

发布语言稳定但主机模型仍可演化

理解等级:高级

多系统靠临时协议连接且维护成本上升时,可改为[[发布语言是文档化共享交换模型]]:优先评估已有行业标准;没有合适标准时,从主机核心域提炼交换表达,发布给协作方,再为各方建立翻译层并切换。

交换语言需要相对稳定,主机内部模型仍须有重构自由;两者可以接近以降低翻译成本,却不能被视为永远同一个模型。后续若收益变化,应允许主机与交换模型逐渐分离。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      Remember, the PUBLISHED LANGUAGE must be stable, yet you'll still need the freedom to change the host's model as you continue your relentless refactoring. Therefore, do not equate the interchange language and the model of the host. Keeping them close together will reduce translation overhead, and you may choose to make your host a CONFORMIST. But reserve the right to beef up the translation layer and diverge if the cost-benefit trade-off favors that.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第115章《Transformations》(源文件:_epub-src/0321125215_ch14lev1sec14.html;单元04) - 结论依据:原文给出从临时协议转向发布语言的步骤,并明确警告稳定交换语言不能等同主机可重构的内部模型。 - 原始内容:Remember, the PUBLISHED LANGUAGE must be stable, yet you'll still need the freedom to change the host's model as you continue your relentless refactoring. Therefore, do not equate the interchange language and the model of the host. Keeping them close together will reduce translation overhead, and you may choose to make your host a CONFORMIST . But reserve the right to beef up the translation layer and diverge if the cost-benefit trade-off favors that.