Domain-Driven Design: Why Do Companies Need This Approach, Who Uses It, and What Is Its Essence?
Published: 2023-11-16 13:03:29

Building software that meets the needs and expectations of businesses and users in a dynamic and ever-changing technological world can be challenging. Software companies gradually require a workable way to make communication between the business and the product team more transparent. The domain-driven design (DDD) approach helps to solve this problem by fostering a profound understanding of the subject matter and continuous collaboration between developers and business experts. In fact, developers gain a more in-depth understanding of the underlying domain and business rules through constant communication. At the same time, stakeholders gain a better understanding of technical capabilities and constraints.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hz52lsodmxdwdny8enxo.png)

For example, [Standish Group’s analysis](https://simpleisbetterthancomplex.com/media/2016/10/chaos-report.pdf) of 100 projects found that 70% of rework was due to a lack of domain knowledge during the requirements and design phases, confirming that DDD fosters understanding between businesses and developers.

According to [Forrester](https://www.forrester.com/report/vp-bank-using-domain-driven-integration-and-event-driven-architecture-to-accelerate-innovation/RES179773), development teams practicing an iterative DDD model work 60% faster than if they spent months on upfront analysis.

Research conducted by the University of Cambridge found that modeling domain knowledge within a DDD framework leads to a [29% increase in team productivity](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/F096891AB04F4F8CBBB50925698E100A/S2732527X22000736a.pdf/from-a-monolithic-plm-landscape-to-a-federated-domain-and-data-mesh.pdf). Clearly, this approach unlocks internal domain knowledge.

So why do companies need this approach, who uses it, and what is its essence?

**

## Core principles of domain-driven design
**
Domain-centric design is based on several key concepts that enable the creation of domain-centric software.

● First is the prioritization of the domain model. It represents the underlying business entities, behaviors, relationships, and rules. Code implementation directly reflects the domain model, not the other way around. The model is developed iteratively, not predetermined in advance.

● Another core principle is the development of a ubiquitous language. This shared vocabulary of developers and business experts standardizes terminology and domain knowledge, eliminating ambiguity and inconsistency across teams.

● DDD also includes strategic and tactical design phases. Strategic design focuses on the high-level organization of the domain as bounded contexts and sub-areas. Tactical design encompasses patterns and lower-level implementation components such as entities, services, and repositories.

Additional concepts include emphasizing exploratory modeling rather than analysis, continuous domain immersion, and using ubiquitous language for documentation.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w621hrkhc6wby60fw3nm.png)

By combining modeling, language, and context-based techniques, DDD enables the creation of systems that focus not only on technical requirements but also on the core concepts of the domain.

In this context, [Hexagonal Architecture](https://netflixtechblog.com/ready-for-changes-with-hexagonal-architecture-b315ec967749?gi=6ab18e0f0179) and [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) immediately come to mind, which share the common goal of task separation. You can isolate core business logic from external problems by dividing applications into loosely coupled components.

Let’s look at the elements that define strategic and tactical design and how they affect the result.

**

## Strategic design
**
In the context of DDD, strategic design is an essential part of software development. It includes the following main aspects:

● Overview. Strategic design begins with an overview of the problem domain and business value. In this step, key concepts and processes are explored, and key business needs and goals are identified.

● Problem space and solution space. The strategic design framework identifies two main conceptual spaces: the problem space and the solution space. The problem space focuses on exploring and analyzing the business domain, identifying entities, aggregates, services, and the relationships between them. The solution space is concerned with creating a model that effectively solves the problems identified in the problem space.

● Restricted contexts. Restricted contexts are limited subdivisions of a domain that correspond to the areas of responsibility of specific development teams. Each context defines its entities, aggregates, services, and rules. Managing context boundaries is essential to isolate and understand the different parts of the domain.

● Core domain. The core domain is the core of the business, its most important and valuable part. Within strategic design, the core domain is critical because it is the focus of development and contains the fundamental abstractions and business rules that define the software’s functionality.

Strategic design in the context of DDD enables the creation of effective strategies for software development by considering the characteristics of the business domain. This helps developers create software that meets business requirements, scales flexibly, and is easily maintained over time.

**

## Tactical design
**
Tactical design is part of the software development methodology. It is responsible for a defined set of tools and approaches to create efficient and flexible architectures that reflect the business domain and ensure data integrity.

It starts with an overview of the business domain and its requirements. This step analyzes the core processes, entities, aggregates, and the relationships between them. The goal is to gain a deeper understanding of the core components of the domain.
Next, we focus on the heart of the application, also known as the core aggregate. The core aggregate is the primary interaction element and contains the domain’s key logic and data integrity. It defines the core operations and business rules.

Moving on to the tactical design toolkit, which gives us a set of rules and patterns for building an effective application architecture. It includes concepts such as Value Objects, Entities, Services, and Aggregates. This toolkit helps developers to create an agile architecture.

One example of using the tactical design toolkit is the creation of repositories. Repositories are responsible for storing and retrieving data from the repository of a specific entity or aggregate. They provide a single interface for interacting with the data repository and encapsulate data storage details.

Tactical design also distinguishes between application services and domain services. The application services coordinate actions and interactions between different entities and aggregates within the application. As for domain services, they store business logic and execution of operations related only to the domain model.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6g6fmcvrisxjycgkp5c.png)



To summarize, tactical design helps to create effective architectures that reflect the business domain and guarantee data integrity. Using tactical design tools simplifies application development and support, making it easier to understand and scale complex domains.

**

## Bounded context and ubiquitous language: Their role in DDD
**

The bounded context within DDD is a localized set of models and rules applied within a specific business domain. It helps to delineate and restrict different aspects of the system within a particular context.

A bounded context represents the boundary within which development takes place and ensures consistency of models and rules within that context. Accordingly, it can have its own modeling language and even business domain-specific terms.

It allows developers to better understand and model a complex subject area and facilitate stakeholder communication. Limited contexts can exist in parallel and interact through defined interfaces.

Another equally important concept to focus on when we talk about DDD is ubiquitous language.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqvthkouv6lqdy6utvez.png)

It can be characterized as a common language used and understood by all development team members.

A ubiquitous language is created and maintained within a limited context. It includes specialized terms, phrases, and rules that reflect the system’s business understanding and subject matter. This language serves as a familiar base that facilitates effective communication between different team members.

Its primary mission is to help avoid misunderstandings related to different interpretations and understandings of terms or concepts and, in a sense, contribute to a deeper and more accurate modeling of the subject area.

The key that unlocks new solutions: What does the DDD approach bring to the table, and who does it work for?
If a project deals with intricate business logic, ever-changing processes, relationships, and business rules, it becomes an ideal candidate for implementing Domain-Driven Design principles. By applying DDD, developers can effectively navigate complex domains and create software solutions that accurately reflect the intricacies of the real world.

DDD is also highly adaptable and flexible to future changes. As businesses evolve and face new challenges, software solutions must keep pace. The clear separation of limited contexts and the use of a ubiquitous language facilitate the seamless integration of updates and modifications, minimizing the need for major system-wide changes. The result is smooth transitions, reduced stress levels, and cost savings for the company.

**

## The power of small DDD teams
**
Domain-driven design lends itself well to small, autonomous teams. The [“two-pizza team”](https://docs.aws.amazon.com/whitepapers/latest/introduction-devops-aws/two-pizza-teams.html) concept exemplifies this. The idea is that a team should be small enough to be fed by just two pizzas. This enables focus, alignment, and productivity.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fix8mq3dlo56atrbfk1.png)



We see the “two-pizza team” approach intertwined with DDD being successfully applied to industry leaders like Netflix (this allowed them to scale the platform quickly) and Uber (they were able to flexibly isolate incidents and manage fluctuations in demand).

It seems like DDD is an exclusive club with members like Netflix, Uber, and our humble WebLab Technology. We’re in good company, aren’t we?

Yes, we use DDD as one of our primary approaches to developing complex business software. And it seems we are among the few companies working with it.

Someone created a discussion on the DEV Community portal asking, “How to find companies that follow a domain driven design approach?”


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sp38a0yhe6w2k8no85am.png)


To find DDD practitioners, follow the trail of well-structured conversations… or just look for our team!

But someone decided to suggest that you can find such companies if they mention in their proposals that they work with DDD. The demand is there, but there are not so many offers.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1tj4zymkauqfq1qom35d.png)

As you can see, small, cohesive teams play a crucial role in complex domains. They can quickly accumulate knowledge and use the language of their field universally.

For companies adopting DDD, embracing the two-pizza team paradigm unlocks productivity and innovation across domains. The nexus of small teams and domain-driven design is powerful.

In particular, DDD enables:

● Improved communication: The ubiquitous language allows developers and business experts to collaborate more efficiently.

● Business alignment: The software design directly reflects real business processes and goals.

● Flexibility: The modular architecture makes it easy to modify applications as needs change.

● User focus: Focusing on the domain allows the creation of solutions tailored to user needs.

● Efficiency: Close involvement of subject-matter experts results in products that solve real business problems.

**

## DDD and small organizations: possible challenges
**
In smaller organizations, DDD integration may not be as prevalent as in larger companies. However, the ability to integrate depends on specific needs and priorities. DDD integration can be beneficial if a small organization has a complex subject area or faces the need to effectively manage and model business processes.

However, be prepared for the obstacles that may arise, which include:

● Limited resources. Smaller organizations may have limited developers and time, making it challenging to implement a new methodology.

● Difficulties in subject matter modeling. DDD integration requires a deep understanding of the subject area and modeling it correctly. Lack of software development experience can be a barrier.

● Resistance to change. Smaller organizations may be more prone to resistance to change, especially if existing processes and software architecture are already established.

● Technical limitations. Outdated technical infrastructure that does not support full DDD integration.

Indeed, not all of these hurdles are true for all small organizations. Every organization has unique characteristics and challenges that can impact DDD integration.

**

## DDD implementation: Start gradually
**
Now, let’s look at the basic steps of effectively implementing DDD without getting confused by the complexities.

- 
 Start Small

Starting small with DDD is advisable, especially when new to it or dealing with a large system. Pick up a small, less critical part of the application and start applying DDD.

- 
Continuous Learning

Often, the first implementation might not be perfect. It’s a continuous learning process. Don’t get disheartened by initial challenges. Understand the mistakes and learn from them.

- 
Collaboration

DDD isn’t just about coders. It involves the entire team: developers, project managers, system analysts, domain experts, etc. It demands a close collaboration for knowledge sharing and software development based on business demands.

Finally, as we’ve said before, one must remember that DDD isn’t always the solution for all projects. The complexity it introduces might not be necessary for simple applications, making it essential to evaluate its need in the project.

**

## Intersection: The DDD connection to Agile
**
So, how does the intersection of DDD with Agile manifest itself? DDD and Agile share similar principles, setting the stage for their successful integration.

1. Active engagement with stakeholders. In DDD, this is reflected in the pervasive use of language that facilitates effective communication, while Agile focuses on collaboration to create value.
2. Flexibility and adaptability. Both methodologies are adaptable. Agile is designed to accept and implement change, while DDD models evolve to reflect domain understanding.
3. Iterative development. Agile is focused on developing software in small, incremental steps. In DDD, models are refined as they evolve, which brings us back to the iterative nature of DDD of Agile.

The connection between DDD and Agile manifests itself as a complementary relationship. Thus, using DDD in an Agile environment can streamline communication, ensure better alignment with business requirements, and deliver high-quality software.

We can confidently say that industries that rely heavily on domain knowledge find particular value in DDD’s focus on learning the intricacies of their specific domains. Ultimately, the essence of domain-centered design lies in its ability to create high-quality software that is closely aligned with the needs of businesses and their customers.

For [WebLab Technology](https://weblab-tech.webflow.io/), the DDD approach is an integral part of our ideology of building long-term technical partnerships with customers. And it aligns with Conway’s Law, which states that software systems reflect the communication structures of the organizations that build them.

Our specialized teams create architectures that are a natural fit with our customers’ domains, and the deep involvement of domain experts allows us to create a smooth communication chain that involves everyone. Perhaps the more companies realize the need for this approach, the more valuable DDD benefits will be discovered in the future.

After all, as Eric Evans wrote in his book, “to communicate effectively, the code must be based on the same language used to write the requirements — the same language that the developers speak with each other and with domain experts.”