← 返回刚才阅读的位置

知识卡片

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

合并上下文先建小共享内核

理解等级:高级

两个限界上下文若翻译和重复成本过高,即使最终目标是单一上下文,原书也建议先建[[共享内核只共享双方必需的模型子集]],逐轮扩大:

  1. 核实各上下文本身已有一致模型;先约定共享代码、命名、测试和集成节奏。
  2. 从双方重复、非核心且容易理解的小子域开始。联合团队厘清同义词、设计模型及测试,再让双方代码接入。
  3. 删除不再需要的翻译;后续迭代逐步处理更复杂或核心的子域。

原书提出共享内核代码至少每周集成,是该迁移方案的过程建议,不是所有项目的通用频率。不同用户群体的专业术语宜暂缓合并,除非出现能覆盖双方的新模型。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      Set up the process. You'll need to decide how the code will be shared and what the module naming conventions will be. There must be at least weekly integration of the SHARED KERNEL code. And it must have a test suite. Set this up before developing any shared code. (The test suite will be empty, so it should be easy to pass!)

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第115章《Transformations》(源文件:_epub-src/0321125215_ch14lev1sec14.html;单元01) - 结论依据:原文明确以共享内核作为完全合并前的路径,并逐项给出准备测试、先选小子域、联合建模、接入和删翻译的步骤。 - 原始内容:Set up the process. You'll need to decide how the code will be shared and what the module naming conventions will be. There must be at least weekly integration of the SHARED KERNEL code. And it must have a test suite. Set this up before developing any shared code. (The test suite will be empty, so it should be easy to pass!)