了解 Eric Evans 的 DDD 书中的一些特定于银行领域的示例

Understanding some banking domain-specific examples from Eric Evans's DDD book

不幸的是,当我试图理解那本书中银行业的具体例子时,我无法克服困难。这真的减慢了我的速度。可能有人可以帮助我。

在我看来,作者没有很好地解释特定领域的示例。首先,他给我们展示了一些相对简单的模型图。然后与领域专家进行一些对话,然后是 BOOM,我第一次看到模型中的新词。我无法理解。甚至不知道我是否需要了解它。例如,第 9 章中的模型:

变成这样:

什么是DailyCompound,什么是Accrual Schedule.

我错过了什么?可能是我必须学习银行领域?老实说,我知道作者想向我们解释什么,我得到了知识处理的所有优势,这使得一些隐藏的模型变得显而易见。但是,我想完全理解为什么模型会变成这样?

这是我对此的看法:

第一张图片显示了一个非常面向服务的模型,其中 "Calculators" 或多或少是技术服务。我认为作者想表明这是一个由开发人员而不是领域专家创建的模型。

如果开发人员现在向银行业专家询问以下问题:"How do you guys calculate your fees to bill the customers?" 对话可以这样进行:

  • 答:"Well that depends on the method used for the asset in question"
  • 问:"So there are Assets... and what kind of methods?"
  • 答:"Well, we employ two kinds of Accrural Schedules. Monthly and Daily. Daily sums up all fees based on the respective interest rate of that day. whereas monthly is more like a lump sum for that month"
  • 问:"And how would you know which fees to sum up at the time of calculation?"
  • 答:"We keep a record or history of all past Income Accruals and go from there. So we always know the lastAccrualDate. Oh, and we keep a record of the Payments as well, if that helps"

我本人不是银行专家,这里的细节可能不准确。但后一种模型 可能 实际上源于与领域专家的对话。我想这就是作者想要表达的观点