领域模型还是领域对象? - 定义
如果我错了,请纠正我。
我们可以说领域模型来表示:
a) MVC 结构的 M 部分,在 M 部分上应用了领域驱动设计模式。
b) 实体及其属性和关系以某种方式组成的方案。也可以表示 MVC 上的 M 部分,但在这种情况下,无论使用哪种模式。
c) 领域模型设计模式,其中“领域模型创建互连对象的网络”;
d) 作为领域对象(例如,可以是我们的 MVC 模型上涉及某个领域的对象);
我们可以说 d) 与 b) 相同吗?
多谢。
Please correct me if I'm wrong.
We may say Domain Model to represent:
a) The M part of a MVC structure, having on the M part, a Domain Driven Design pattern applied.
b) A scheme of entities, their attributes and relationships in a certain way. Could also represent a M part on a MVC but, on this case, regardless the pattern used.
c) A Domain Model Design Pattern where "a Domain Model creates a web of interconnected objects";
d) As a Domain Object (that could be, for example, an object on our MVC model regargind a certain domain);
Could we say that d) is the same as b) ?
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
简短的回答:不,它们不一样。
域对象实际上是(已删除)..看看@meze的评论..有一个链接。
这部分“实体方案、它们的属性和关系”与数据结构有点相关。但是域对象不应该知道它们已被存储,甚至不知道存在存储。这是数据访问层的职责。
领域模型是操纵不同类型和数量的领域对象的总体结构。
Shorty answer: no, they are not the same.
Domain objects actually are (removed) .. look at the comment from @meze .. there is a link.
This part "scheme of entities, their attributes and relationships" is kinda related to structure of the data. But you Domain objects should not be aware of fact that they are stored or even that there exists a storage. That is responsibility of Data access layer.
And the Domain model is the overarching structure which manipulates different types and numbers of Domain objects.
领域对象是领域模型的一个元素。域对象是b)。
Domain Object is an element of Domain Model. Domain object is b).