开发者

What's the difference between Domain Model and OO Domain Model?

开发者 https://www.devze.com 2023-03-13 09:35 出处:网络
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

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 capt开发者_开发知识库ure almost the same thing, aren't they?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消