fbpx

Domain Driven Design

Domain Driven Design

Simple Receipt application Domain Model

Object Oriented Programming is a very powerful tool due to which is based on a modeling paradigm and provides an implementation of the model constructions. Java and other tools allow you to create objects and relationships directly analogous to the conceptual model of objects.

Domain-guided or domain-driven design is an approach to the development of software with complex needs by connecting the implementation with an evolving model of key business concepts. 1

A good domain model captures the essential information and abstractions needed to understand the domain in the context of current requirements and helps people understand the domain – its concepts, terminology, and relationships. Object-oriented programming is powerful because it is based on a modeling paradigm.

Guided or domain-oriented design (DDD) is not exactly one technology, but a guide to practices and terminology for organizing the applications and structure the code. DDD is based on abstracting and “naturalizing” the how it interacts with the system.

This term was coined by Eric Evans, in the book “Domain Driven Design ”.2

This approach complements each other very well with MVC architectures, especially in the model layer.

Domain Model for a recipe application


Terminology used in domain-guided design:


Entity: An object defined primarily by a thread of continuity and identity2. The concept of identity adopted by DDD goes further beyond the operations of object-oriented languages ​​that they provide an “identity” to each object. (for example the operator == in java).

The concept of identity, from the point of view of DDD, is one more let’s say, a metaphysical attribute, which emerges from the model and takes meaning through of the domain. It is this concept that guides the design of the operation identity between domain objects. For example, in most applications, the “email” attribute is used as the identifier of two object instances of type User, since two users cannot have the same email.


Value Object: An object that has no identity. Usually such objects are immutable.

Repository: Objects used to store, retrieve, and remove domain objects from multiple implementations storage.

Service: Type of object that performs operations that do not belong conceptually to a particular object.

Aggregate: Cluster of domain objects that can be treated as a single unit.

Factory: The type of object used to create complex Aggregates.

  1. Domain Language, Inc. and contributors, 2007 []
  2. Domain Driven Design, Evans, 2004 [] []

Need help with this topic?

I will be glad to assist you.

Contact me for further information here 

You can give me support if you find this content is usefull!

Buy Me a Coffee

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish