知识卡片

结构图卡 · 1971.o.1.c.1.d.1

交易对象从融资安排中接过规则

理解等级:高级

原书第二次重构把贷款提款、利息支付、费用支付等建成 Transaction 的不同类型,让交易承担各自的规则、协商和审批流程;Facility 与 Loan 被归入更一般的 Position,继续表示当前状态和份额。图8.9因此把“位置是什么”与“哪次交易改变它”分开。Transaction 是书中金融交易领域的实体,不等于数据库事务;这里记录作者项目模型,其他业务需重新识别边界。参见[[反复出现的业务词可能揭示缺失概念]]。

结构图:

classDiagram
    class Position
    class Facility
    class Loan
    class Transaction
    class Drawdown
    class InterestPayment
    class FeePayment
    Position <|-- Facility
    Position <|-- Loan
    Transaction <|-- Drawdown
    Transaction <|-- InterestPayment
    Transaction <|-- FeePayment
    Position --> Transaction : 应用后改变状态
这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 原书第08章|Epilogue: A Cascade of New Insights · 查看原书依据

      This new model made those implicit concepts explicit, as kinds of Transactions, and at the same time simplified the Positions (an abstraction including the Facility and Loan). It became easy to define the diverse transactions we had, along with their rules, negotiating procedures, and approval processes, and all in relatively self-explanatory code. Figure 8.9. Another model break-through that followed several weeks later.

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第67章《原书第08章|Epilogue: A Cascade of New Insights》(源文件:_epub-src/0321125215_ch08lev1sec4.html;图8.9) - 结论依据:原文描述 Transactions 与 Positions 的新抽象,图8.9展示 Facility/Loan、提款与付款的类型关系及交易执行。 - 原始内容:This new model made those implicit concepts explicit, as kinds of Transactions , and at the same time simplified the Positions (an abstraction including the Facility and Loan ). It became easy to define the diverse transactions we had, along with their rules, negotiating procedures, and approval processes, and all in relatively self-explanatory code. Figure 8.9. Another model break-through that followed several weeks later.