English 中文(简体)
为什么地点是实体?
原标题:Why Location is an Entity?

我正在阅读货物DDD样本编码。 谁能向我解释为什么该地点是实体? 我认为这应该是一个价值目标。 你认为什么?

最佳回答

地点是实体的一个原因,它有识别特征,并且是实体的组成部分。 货物从一个源地向某个特定目的地运输。

你们需要按照自己的身份正确确定传播地点,因此,需要一个存放处从数据来源获取地点或插入新的地点。

问题回答

我认为,有关实体实施的所有内容都是“是”的,但价值物体是“什么是”。 价值目标总是不可变和共享。

在货物样本中,我认为我们应当区分地点,而不仅仅是地点。





相关问题
DDD - Returning entity in response to a service operation

I am new to domain driven development & have a simple question. If a service needs to generate some entity as a response to an operation then how should it be done? One of the ways is to inject ...

Domain Driven Design efforts in dynamic languages? [closed]

Are you aware of any DDD efforts in a dynamic language ? Practical resources on DDD tend to decrease quite dramatically when straying from enterprise-oriented solutions (a google search exluding C#, ....

Accessing domain objects in the view

If I don t want to expose the internal state of my Domain Objects, but I need to display them, I can think of three approaches. Which of these is the most "correct" (if any?). The "DTO/ViewModel ...

DDD screen cast question?

I wathced a screen cast on DDD by Greg Young the other day which spoke about persisting all state transitions of an object, instead of it s state when saved, then to load it "replay" all these ...

How to fluent-map this (using fluent nhibernate)?

I have two tables in my database "Styles" and "BannedStyles". They have a reference via the ItemNo. Now styles can be banned per store. So if style x is banned at store Y then its very possible that ...

热门标签