领域模型和OO领域模型有什么区别?

发布于 2024-11-15 20:33:04 字数 197 浏览 3 评论 0原文

据说领域模型用于捕获应用程序的问题域。这就是所需的要求,等等。但通常,这些模型几乎非常接近在实现阶段可能出现的类。

但还有一种称为面向对象域模型的东西,据说它捕获“问题域的数据抽象”。通过“问题域的数据抽象”这个短语,我将其理解为“可以分离的问题域的层”。

在这种情况下,领域模型和 OO 领域模型有什么区别?他们都捕捉到了几乎相同的东西,不是吗?

It is said that the Domain Model is used to capture the problem domain of an application. That's what are the requirements needed, etc. But often, these models are almost very close to what may turn out as classes during the implementation stage.

But there is also something called the Object-Oriented Domain Model, which is said to capture the "data abstraction of a problem domain". By the phrase "data abstraction of a problem domain", I understand it as the "layers of the problem domain that could be separated".

In this case, what's the difference between the Domain Model and an OO Domain Model? They both capture almost the same thing, aren't they?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

站稳脚跟 2024-11-22 20:33:04

像这样考虑它; OOP 的一个关键组成部分是关注点的聚集;对数据进行操作的方法应与该数据分组。通常,领域模型将捕获问题领域,但由于问题领域的“怪癖”,领域模型可能无法反映适当的关注点集群。面向对象的领域建模只是将领域模型重新映射到面向对象(即关注点集群)模型。

你说得对,它们捕获了相同的东西,但关键是领域模型更关心纯粹代表问题领域; OODM 关注以反映适当的 OOP 技术的方式表示问题域。

Consider it like this; one critical component of OOP is the clustering of concerns; methods that operate on data should be grouped with that data. Frequently, a Domain Model will capture the problem domain, but because of problem domain "eccentricities", the Domain Model may not reflect an appropriate clustering of concerns. Object-Oriented Domain Modeling is simply a remapping of a Domain Model into an Object-Oriented (i.e., concern-clustered) model.

You're right that they capture the same thing, but the key is that the Domain Model is more concerned with purely representing the problem domain; the OODM is concerned with representing the problem domain in a manner that reflects appropriate OOP techniques.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文