知识卡片
简单脚本有复杂度上限
事务脚本适合ETL、简单支撑功能和外部模型适配,优势是抽象少、过程清楚。规则变复杂后,同一业务知识容易在多个操作间复制并逐渐分歧,因此不适合复杂核心子域。不能因它简单就一律视为反模式,也不能因为易上手就扩展到所有业务。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 实现简单业务逻辑 · 查看原书依据
The main advantage of the transaction script pattern is its simplicity. It introduces minimal abstractions and minimizes the overhead both in runtime performance and in understanding the business logic. That said, this simplicity is also the pattern’s disadvantage. The more complex the business logic gets, the more it’s prone to duplicate business logic across transactions,
参考来源
- 位置:《Learning Domain-Driven Design》第5章《实现简单业务逻辑》(来源项目:book-sources;源文件:extracted/Learning Domain-Driven Design/_epub-src/OEBPS/ch05.html)
- 结论依据:原文对该概念的定义、应用条件及相邻概念的比较支撑本卡解释。
- 原始内容:The main advantage of the transaction script pattern is its simplicity. It introduces minimal abstractions and minimizes the overhead both in runtime performance and in understanding the business logic. That said, this simplicity is also the pattern’s disadvantage. The more complex the business logic gets, the more it’s prone to duplicate business logic across transactions,