Are Domain Model and Object Model the same thing? What is the difference between these two? Please explain with simple example. I'm new in this concepts. I searched a lot in Google. But I couldn't get any simple explanation and example.
A Domain Model is an Object Model describing the problem domain. They include the domain objects in the problem domain and describe the attributes, behavior and relationships between them.
Describes the specification and generation of a domain object model in Java™, based on the Application Data Model. The domain object model is based on the Decision Optimization Center Application Data Model.
A domain model is a representation of the organization's data, independent of the way the data is stored in the database, with a domain being the collection of all the objects in that system, while the data model is used in database design and development.
A domain object is an entity in the domain layer of your application, eg. an Address class. "Model" means the same thing - an entity in the "Domain Model". A POCO (plain old CLR object) is an object that has no behaviour (methods) defined, and only contains data (properties).
An Object Model of a system is a collection of classes and objects describing the relationships between them and the properties and methods contained within, in terms of the Object Oriented principles : Abstraction, Encapsulation, Inheritance and Polymorphism.
A Domain Model is an Object Model describing the problem domain. They include the domain objects in the problem domain and describe the attributes, behavior and relationships between them.
If you talking about theses concepts according to DDD (Domain Driven Design), I don't agree with neigher of the preceding answers. As the author pointed out in his book,
A domain model does not have to be an object model. There are MODEL-DRIVEN DESIGNS implemented in Prolog, for example, with a model made up of logical rules and facts.
So a Domain Model is a representation of you domain rules based on any paradigm, not necessarly should it be Object, it could be any other paradigm, but the most important about it, is that it must make domain concepts and rules clear and separated from other technical aspects.
In conclusion, we can say that an Object Model is one of the representation forms of a Domain Model
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With