返回主题:领域逻辑的组织方式

知识卡片

普通读书笔记卡 · 1971.o.1.b.4.d.2

框架能力应选择性使用

理解等级:高级

架构框架可替应用解决复杂技术问题,也可能要求领域对象继承特定类或遵守固定方法签名,使模型表达受限。选择框架能力时,应先看它是否帮助表达业务模型,再只采用解决实际难题所需的部分。原书以早期 J2EE 把所有领域对象做成 entity bean 为例,说明过度套用会拖慢开发和性能;这是历史技术案例,不是对当前框架版本的实测结论。参见[[领域对象与技术职责隔离]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第30章《原书第04章|Layered Architecture》(源文件:_epub-src/0321125215_ch04lev1sec1.html) - 结论依据:原文对比框架解决技术难题与约束领域设计的两面,并用早期 J2EE entity bean 的应用方式说明选择性使用可降低耦合。 - 原始内容:The best architectural frameworks solve complex technical problems while allowing the domain developer to concentrate on expressing a model. But frameworks can easily get in the way ... A lot of the downside of frameworks can be avoided by applying them selectively to solve difficult problems without looking for a one-size-fits-all solution.