← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2276.m.1.a

领域模型封装业务

理解等级:中级

领域模型把数据与业务行为放在一起,以处理相互影响的状态转换、规则和不变量。不变量是任何有效状态都必须满足的约束。工单升级、自动关闭、重开期限互相制约时,任意修改字段的CRUD接口容易绕过规则。模型应聚焦业务,隔离数据库和框架细节,使类型与行为使用统一语言。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 应对复杂业务逻辑 · 查看原书依据

      The domain model pattern is intended to cope with cases of complex business logic. Here, instead of CRUD interfaces, we deal with complicated state transitions, business rules, and invariants: rules that have to be protected at all times. Let’s assume we are implementing a help desk system. Consider the following excerpt from the requirements that

    参考来源

    - 位置:《Learning Domain-Driven Design》第6章《应对复杂业务逻辑》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch06.html) - 结论依据:原文围绕本卡所述机制给出定义、适用条件及相关取舍,以下摘录为直接依据。 - 原始内容:The domain model pattern is intended to cope with cases of complex business logic. Here, instead of CRUD interfaces, we deal with complicated state transitions, business rules, and invariants: rules that have to be protected at all times. Let’s assume we are implementing a help desk system. Consider the following excerpt from the requirements that