java - 领域驱动设计实体和值对象

标签 java c# domain-driven-design

<分区>

在 DDD 中建模的每个类型都必须是实体或值对象吗?

最佳答案

不,在 DDD 中,您可以为以下类型的对象建模:

Domain Event: A domain object that defines an event. Where a domain event is something that happened that domain experts care about.

Service: When an operation does not conceptually belong to any object. Following the natural contours of the problem, you can implement these operations in services.

Repository: methods for retrieving domain objects should delegate to a specialized Repository object such that alternative storage implementations may be easily interchanged.

Factory: methods for creating domain objects should delegate to a specialized Factory object such that alternative implementations may be easily interchanged.

关于java - 领域驱动设计实体和值对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29147588/

相关文章:

java - 如何从 inputFileStream 读取并分割每一行

java - 将所有复选框(已选中)项收集到 Array 或 ArrayList 中

c# - mysql中SUM()的返回类型是什么?

c# - Windows 后台打印驱动程序 - 状态请求发送不正确

java - 使用 JPA/Spring 的(通用)DDD 存储库的方法 : does it look wrong?

java - 为什么我的 tomcat 应用程序的内存使用量不断增长?

java - 为什么 List<String> 不能同时作为基类泛型方法和派生类非泛型方法的参数?

c# - Nhibernate 一对多关系错误

domain-driven-design - "rich domain model"会违反单一责任原则吗?

f# - 在 FSharp 中键入同义词