Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Domain Model

I have read the wikipedia definition of a domain model. I still don't get it. I have been reading alot of posts for NHibernate and almost in every post I read I see the term Domain Model. What exactly is it and does any one have an example of a domain model.

like image 688
Luke101 Avatar asked Dec 07 '09 23:12

Luke101


People also ask

What is meant by domain model?

The domain model is a representation of meaningful real-world concepts pertinent to the domain that need to be modeled in software. The concepts include the data involved in the business and rules the business uses in relation to that data. A domain model leverages natural language of the domain.

What is a domain model and why is it important?

Domain Modeling is a way to describe and model real world entities and the relationships between them, which collectively describe the problem domain space.

What is data model and domain 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.


2 Answers

Basically, it's the "model" of the objects required for your business purposes.

Say you were making a sales tracking website - you'd potentially have classes such as Customer, Vendor, Transaction, etc. That entire set of classes, as well as the relationships between them, would consititute your Domain Model.

like image 186
Reed Copsey Avatar answered Sep 24 '22 09:09

Reed Copsey


If you were to take your program and strip away the gui and the DBMS, and replace it with a command line interface, and a MySQL server instance, then port the whole thing to a different platform with different system calls and file system access api calls, the part that you didn't change in that process is the domain model.

like image 31
Breton Avatar answered Sep 24 '22 09:09

Breton