Domain Driven Design

Domain Driven Design
Photo by Fayette Reynolds / Unsplash

Many software development projects focus solely on functionality, with little attention paid to how the system will be used or how it will fit into the larger business context. This can lead to a disconnect between the software and the business, which can be problematic as business needs change and evolve.

Domain Driven Design seeks to bridge this gap.

Domain Driven Design is a discipline that emphasises the connection between complex domain models and software design.

It aims to create a common language between software developers and business people, and by focusing on modelling the core concepts and objects in the domain. This allows for a more flexible and maintainable system that can adapt as business needs change.

The main tenets of Domain Driven Design are:

  1. Focus on the core domain. When designing the domain model, it is important to focus on the core domain first and foremost. This is the part of the problem domain that is most critical to solving the problem at hand. All other concepts should be secondary in importance
  2. Model-driven. Uses a shared language and models between technical and non-technical stakeholders to represent the problem domain.
  3. Make explicit what is implicit. The domain model should make explicit what is implicit in the problem domain. This includes both the relationships between concepts, as well as the business rules that govern them.
  4. Ubiquitous language. Encourages a shared understanding of the domain by using a common vocabulary across teams.
  5. Strategic design. Dividing the problem into bounded and explicit contexts, thereby reducing complexity and promoting flexibility.
  6. Collaboration. Encouraging collaboration between domain experts, developers, and other stakeholders to create a common understanding.

Notes

There are many valid definitions of Domain Driven Design. I use this definition when it is a new concept for product people, analysts or tech leads.

I recommend the following alternative definitions: