Domain model#

Domain Model is a pattern used in Domain-Driven Design. It is a conceptual model of the domain that incorporates both behavior and data. In other words, it is a representation of the real-world concepts that are being modeled in the software. The domain model is used to define the structure and behavior of the domain objects, as well as the relationships between them.

Read mora about it in this article by Marting Fowler.

in short:

  • The objects are meaningful.

  • Behavioral responsibility finely defined between classes. So good isolation, testability and maintainability.

  • Objects responsible of their state. Indeed, no need to provide setters as the object can itself update its state after collaborating with other objects.