4

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?

1 Answer 1

3

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.

2
  • 1
    Thanks! So can I say that the Domain Model captures the problem domain while the Object-Oriented Domain Model captures the solution domain? And if this is the case, how would Object-Oriented Domain Model differ from a UML Class Diagram?
    – Carven
    Jun 15, 2011 at 16:36
  • You're close; the OODM captures A solution domain, but it's not necessarily the only one. It's a solution domain that is object oriented, but there can be multiple of those, depending on mapping. OODM can lead to a UML Class Diagram, sometimes in a very straightforward manner, but they're not the same. OODM represents A modeling of process; a Class diagram represents a modeling of information (processing). Like I say, one can lead to another, but keep in mind that they're not the same thing. Jun 15, 2011 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.