An introduction to domain driven design & its benefits
Tags: softwarearchitecture, ddd, domaindrivendesign, beginners
Published: 2018-02-10 22:32:10

---
title: "An introduction to domain driven design & its benefits"
published: true
tags: Software architecture,DDD,DOMAIN DRIVEN DESIGN,beginners
canonical_url: https://apiumhub.com/tech-blog-barcelona/introduction-domain-driven-design/
---

An application can be developed with an amazing architecture, using the latest technologies and having the best interface, etc. but if it doesn’t solve the business’s needs, it won’t be considered useful for it. That’s when domain driven design (DDD) comes in. As its name says, the point here is to focus on the domain of a specific business.

&nbsp;

In fact, to design a good software, it’s important to know what that software is about. To create a banking software system, you need to have a good understanding of what banking is all about, one must understand the domain of banking.

&nbsp;

## What is Domain Driven Design ?

&nbsp;

In software development, the domain driven design approach is used for complex needs, connecting the implementation to an evolving model of the core business concepts. It puts the focus on the problem domain and basically helps identify the architecture and inform about the mechanics that the software needs to replicate.

&nbsp;

DDD has a strategic value and it’s about mapping business domain concepts into software artifacts. It’s about organizing code artifacts in alignment with business problems, using the same common, ubiquitous language.

&nbsp;

DDD isn’t a methodology, it’s more about the software’s architectural design, providing a structure of practices to take design decisions that help in software projects that have complicated domains.

&nbsp;

The DDD approach was introduced by Eric Evans in the book Domain-Driven Design: [Tackling Complexity in the Heart of Software](https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215?tag=drdos-20). Each developer here at [Apiumhub](http://apiumhub.com) has read it and definitely recommend you to read it!

&nbsp;

Mainly, domain driven design focuses on:

&nbsp;

> The core domain and domain logic
> 
> Complex designs on models of the domain
> 
> Improving the application model and resolving emerging domain-related issues by collaborating with domain experts &nbsp;

&nbsp;

DDD encompasses a common language, techniques and patterns as well as an architecture. The focus is put on the business and on modelling the problems that are trying to be solved.

&nbsp;

With DDD, the developers get techniques that will help minimizing the complexity and that will help driving collaboration with the rest. The idea is to use the requirements and to map out the business processes into the model by using the same language that is used by the business itself.

## &nbsp;

## A few common terms used for DDD

&nbsp;

#### Ubiquitous Language

Here we talk about a language that is used by all the team in order to connect all the activities of the team with the software. The ubiquitous language of DDD helps when it comes to knowing more about terms that are used by the business experts. The tech team is able to know if the language changes and if a specific term will be used for a different meaning.

#### &nbsp;

#### Context

The context is a setting that determines the meaning of a statement.

#### &nbsp;

#### Context mapping

A graph that connects the contexts together. For each context you find: a language, an independent implementation and an interface to talk to other bounded contexts.

&nbsp;

#### Bounded contexts

The Bounded context is the context in which the Ubiquitous language and the corresponding models are valid. It gives the team a clear understanding of what has to be consistent and what can develop independently.

&nbsp;

#### Model

The model is a system that describes the selected aspects of a domain and that is often used to solve problems that are related to that particular domain.

&nbsp;

## What are the characteristics of a strong domain model?

#### &nbsp;

#### Being aligned

With the business’ model, strategies and processes.

&nbsp;

#### Being isolated

From other domains & layers in the business

&nbsp;

#### Be loosely designed

With no dependencies on the layers of the application on either side of domain layer

&nbsp;

#### Being reusable

To avoid models that are duplicated

&nbsp;

#### Be an abstract and cleanly separated layer

To have a maintenance, testing, and versioning that is easier.

&nbsp;

#### Minimum dependencies on infrastructure frameworks

To avoid outliving those frameworks and getting tight coupling on external frameworks

&nbsp;

#### Designed with a “Plain Old Java Object programming model

Without having any technology or framework dependencies

&nbsp;

We do agree that this is a very brief and short introduction to DDD. The&nbsp;point of this article was to have an idea of what is domain driven design. I will leave you with a list of key benefits of DDD that might make you even more curious about the topic!&nbsp;

&nbsp;

## Key benefits of domain driven design&nbsp;

&nbsp;

#### Business necessities oriented&nbsp;

&nbsp;

As you know, with domain driven design, everyone ends up using the same language & terms and the team is sharing a model. Developers communicate better with the business team and the work is more efficient when it comes to establishing solutions for the models that reflect how the business operates, instead of how the software operates.

#### A common set of terms and definitions used by the entire team

&nbsp;

This is quite clear but let’s mention it again. Teams find communication much easier during the development cycle because from the beginning, they focus on establishing the ubiquitous language that is common to both parties (development & business experts). The language is linked to the domain model of the project and technical aspect are referred to through simples terms that all understand.&nbsp;

&nbsp;

#### **Keeping track made easy&nbsp;**

This goes without saying, if everyone is using the same terminology, it becomes quite simple to keep track of requirement implementation.

#### **Better code**

&nbsp;

With DDD you end up with a more readable code and less duplication.

#### Agility is a standard

&nbsp;

By following an [agile approach](https://apiumhub.com/tech-blog-barcelona/benefits-of-agile-project-management/) that is iterative and incremental, DDD clarifies the mental model of domain experts into a useful model for the business.

#### Get a good software architecture

&nbsp;

Due to well understood bounced context, all the teams are able to understand where certain integrations are important and especially why. This means you know you’re getting a good software architecture.

#### Communication counts&nbsp;

&nbsp;

Generally speaking, DDD comes in quite helpful when it comes to helping the team creating a common model. The teams from the business’ side and from the developer’s side can then use this model to communicate about the business requirements, the data entities, and process models.

#### A balanced application&nbsp;

&nbsp;

With DDD you build around the concepts of the domain and around what the domain experts are&nbsp;advising. This implies that the applications developed will indeed represent what the domain needs instead of getting an application that is only focused on UX & UI, forgetting the rest of requirements. The most important is to get a balanced product that suits well the users/audience of that specific domain.

#### Keep focus on the solution

&nbsp;

The fact that there are clean boundaries around pure models enables the developers to put their efforts on what matters the most, it enables them to focus on the solution.

&nbsp;

#### Purely flexible

&nbsp;

DDD turns around the concepts of object-oriented design. This implies that almost everything in the domain model is based on an object and therefore will be modular and encapsulated, enabling the system to be changed and improved regularly and continuously.

&nbsp;

## If you enjoy this topic, you might like…

&nbsp;

[The importance of a good software architecture](https://apiumhub.com/tech-blog-barcelona/importance-good-software-architecture/)

[A few benefits you get by doing BDD](https://apiumhub.com/tech-blog-barcelona/behavior-driven-development/)

[Examples of Microservices architecture implementation](https://apiumhub.com/tech-blog-barcelona/microservices-architecture-implementation/)

[Why are microservices a good idea?](https://apiumhub.com/tech-blog-barcelona/microservices/)

[Domain Driven Design Distilled by Vaughn Vernon](https://apiumhub.com/tech-blog-barcelona/domain-driven-design-distilled-by-vaughn-vernon/)

[The 5 SOLID Principles explained](https://apiumhub.com/tech-blog-barcelona/solid-principles/)

&nbsp;

The post [An introduction to domain driven design & its benefits](https://apiumhub.com/tech-blog-barcelona/introduction-domain-driven-design/) appeared first on [Apiumhub](https://apiumhub.com).



_This post was originally published on [apiumhub.com](https://apiumhub.com/tech-blog-barcelona/introduction-domain-driven-design/)_