What is in a 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 domain-driven model?
Domain-Driven Design is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of a domain. The name comes from a 2003 book by Eric Evans that describes the approach through a catalog of patterns.
Which is an example of a domain model?
Let’s start with an example where your application begins with a domain model and it just so happens that the tables in the database match your domain model exactly. Now, your application grows by leaps and bounds and you begin to experience performance issues when querying the database.
How are persistence models used in domain models?
The persistence models what you want to store from an object and that data will be used to restore the object. You can use the ORM entities as a base for domain entities but then you have to coherce the object to obey ORM needs.
Is the domain model dependent on any infrastructure?
Just think of it this way, the domain model should be dependent upon nothing and have no infrastructure code within it. The domain model should not be serializable or inherit from some ORM objects or even share them. These are all infrastructure concerns and should be defined separate from the domain model.
Can a domain model inherit from a DDD model?
The domain model should not be serializable or inherit from some ORM objects or even share them. These are all infrastructure concerns and should be defined separate from the domain model. But, that is if you’re looking for going for pure DDD and your project values scalability and performance over speed of initial development.