What Is Domain-Driven Design? (2024)

In this chapter, you will learn about domain-driven design’s concepts for analyzing a company’s business: the business domain; core, supporting, and generic subdomains; and domain experts.

A business domain defines the company’s overall area of activity. Generally speaking, it’s the service the company provides to its clients. For example:

  • FedEx—courier delivery

  • Starbucks—coffee

  • Walmart—retail

A company can operate in multiple business domains. For example, Amazon provides both retail and cloud computing services. Uber is a ridesharing company that also provides food delivery and bicycle-sharing services.

It’s important to note that companies change their business domains often. A canonical example here is Nokia, which over its lifetime has operated in fields as diverse as wood processing, rubber manufacturing, telecommunications, and mobile devices.

To achieve its business domain’s goals and targets, a company has to operate in multiple subdomains. A subdomain is a fine-grained area of business activity. All the subdomains together add up to the company’s business domain—the service it provides to its customers. Implementing a single subdomain is not enough for a company to succeed.

Often subdomains correlate to the company’s departments or other organizational units. For example, an online retail shop might include subdomains such as catalog management, advertising, accounting, support, customer relations, supplier relations, and others.

From a technical perspective, subdomains resemble sets of interrelated use cases. Consider the use case diagram in Figure1-1 for a credit card payment gateway.

This diagram represents a coherent set of use cases, operating on the same set of actors and business entities. Hence, all these use cases form the “credit card payments” subdomain.

Types of Subdomains

Domain-driven design distinguishes three types of subdomains: core, generic, and supporting. Let’s see how they differ from a company strategy point of view.

Core subdomains

A core subdomain is what a company does differently from its competitors. This may involve inventing new products or services, or optimizing existing processes and thereby reducing costs.

Let’s take Uber as an example. Initially, the company provided a novel form of transportation—ridesharing. As its competitors caught up, Uber found ways to optimize and evolve its core business: for example, reducing costs by matching riders heading in the same direction.

Complexity and rate of change

A simple-to-implement core subdomain can only provide a short-lived competitive advantage. Therefore, core subdomains are naturally complex. There should be high entry barriers for a company’s core business; it should be hard for competitors to copy or imitate the company’s solution.

Core subdomains also tend to change often. It should be part of a company’s business strategy to innovate and evolve its core subdomains continuously. The changes to core subdomains will come in the form of adding new features or optimizing the behavior and ROI of existing ones. Either way, the constant evolution of its core business is essential for a company to stay ahead of its competitors.

Implementation concerns

Core subdomains have to be implemented in-house. They cannot be bought or adopted; that would undermine the notion of competitive advantage, as the company’s competitors would be able to do the same.

It would also be unwise to outsource the implementation of a core subdomain. It is a strategic investment. Cutting corners on a core subdomain is not only risky in the short term, but can have fatal consequences in the long run: for example, unmaintainable codebases that cannot support the company’s goals and objectives. Therefore, the organization’s most skilled talent should be assigned to working on its core subdomains.

From a technical perspective, maintainability and evolution of the business logic are of high importance. Hence, core subdomains require the implementation of the most advanced engineering techniques.

Nature of core subdomains

It’s important to note that core subdomains are not necessarily technical. Not all business problems are solved through algorithms or other technical solutions. A company’s competitive advantage can come from different strategies.

Consider, for example, a jewelry maker selling its products online. The online shop is important, but it’s not a core subdomain. The jewelry design is. The company can use an existing off-the-shelf online shop engine, but it cannot outsource the design of its jewelry. The design is the reason customers are buying the jewelry maker’s products.

Generic subdomains

Like the core subdomains, generic subdomains are generally complex and hard to implement. However, generic subdomains do not provide any competitive edge for the company. There is no need for innovation or optimization here: battle-tested implementations are widely available, and all companies use them. In other words, generic subdomains are business activities that all companies are performing in the same way.

For example, most systems need to authenticate and authorize their users. Instead of inventing a proprietary authentication mechanism, it makes more sense to use an existing solution. Such a solution is likely to be more reliable and secure since it has already been tested by many other companies having the same needs.

Implementation concerns

Generic subdomains are hard but already solved problems. It’s more cost-effective to buy an off-the-shelf product or adopt an open-source solution than to invest time and effort into implementing a generic subdomain in-house.

Supporting subdomains

As the name suggests, supporting subdomains support the company’s business. However, contrary to the core subdomains, supporting subdomains do not provide any competitive advantage for the company. They simply support the company’s core business.

For example, consider an online advertising company. Its core subdomains include matching ads to visitors, optimizing ads’ effectiveness, and minimizing ad spaces’ costs. However, to achieve success in these areas, the company needs to catalog its creative materials. The way the company manages its creatives does not impact its profits. There is nothing to invent or optimize in that area. On the other hand, the creative catalog is essential for implementing its advertising management and serving systems. That makes the content cataloging solution one of the company’s supporting subdomains.

Complexity and rate of change

The most striking difference between core and supporting subdomains is the complexity of the business logic. Supporting subdomains are simple. Their business logic resembles data entry screens and ETL (extract, transform, load) operations; i.e., the so-called CRUD (create, read, update, and delete) interfaces.

Also, contrary to the core subdomains, supporting subdomains do not change often. They do not provide any competitive advantage for the company, and therefore there is no business value in evolving them over time.

Implementation concerns

Lack of competitive advantage makes it reasonable to avoid implementing supporting subdomains in-house. However, unlike with generic subdomains, no ready-made solutions are available. Hence, a company has no choice but to implement supporting subdomains itself. That said, the simplicity of the business logic and infrequency of changes make it easy to cut corners.

Supporting subdomains do not require elaborate design patterns or other advanced engineering techniques. A rapid application development framework will suffice to implement the business logic without introducing accidental complexities.

From a staffing perspective, supporting subdomains do not require highly skilled engineers. Save them for the core subdomains. Also, the simplicity of the business logic makes supporting subdomains a perfect candidate for outsourcing.

Let’s take a look at another DDD term related to business domains that we are going to use often in the next chapters: domain experts. Domain experts are subject matter experts that know all the intricacies of the business that we are going to model and implement in code. In other words, domain experts are knowledge authorities in the software’s business domain.

The domain experts are neither the analysts that gather requirements nor the engineers designing the system. Domain experts represent the business. They are the people that identified the business problem in the first place, and all business knowledge originates from the domain experts. Systems analysts and engineers are just transforming their mental models of the business domain into software requirements and source code.

As a rule of thumb, domain experts are either the people coming up with requirements or the software’s end users. The software is supposed to solve their problems.

The domain experts’ expertise can have different scopes. Some subject matter experts will have a detailed understanding of how the whole business domain operates, while others will specialize in particular subdomains. For example, in an online advertising agency the domain experts would be campaign managers, media buyers, analysts, and other business stakeholders.

We’ve now covered domain-driven design’s tools for making sense of a company’s business activity. As you’ve seen, it all starts with the business domain—the area the business operates in and the service it provides to its clients.

You also learned about the different building blocks required to achieve success in a business domain, including the following:

Core subdomains

The interesting problems. Activities that the company is performing differently from its competitors, and from which it gains its competitive advantage.

Generic subdomains

The solved problems. Things that all companies are doing in the same way. There is no room or need for innovation here; rather than creating in-house implementations, it’s more cost-effective to use existing solutions.

Supporting subdomains

The boring problems. Activities that the company likely has to implement in house, but that do not provide any competitive advantage.

Finally, you learned that domain experts are the business’s subject matter experts. They have in-depth knowledge of the company’s business domain or one or more of its subdomains and are critical to a project’s success.

What Is Domain-Driven Design? (2024)

FAQs

What is domain-driven design in simple words? ›

Domain-Driven Design(DDD) is a collection of principles and patterns that help developers craft elegant object systems. Properly applied it can lead to software abstractions called domain models. These models encapsulate complex business logic, closing the gap between business reality and code.

What is the main goal of domain-driven design? ›

What is the primary goal of Domain-Driven Design? The primary goal of DDD is to create software that closely aligns with the business domain, fostering clear communication among all stakeholders and effectively managing system complexity.

What is DDD in Microservices? ›

Microservices using Domain-Driven Design (DDD)

In domain-driven design (DDD), you can design microservices in two distinct phases. Strategic Phase – This includes defining Bounded Contexts (BCs) and mapping them together. Tactical Phase – We model each BC following the subdomain's business rules during this phase.

Is DDD overkill? ›

If you're an experienced developer (perhaps like the author of this excellent post of the same title), you've likely witnessed the rise of use cases, responsibility-driven design, and have experience with various approaches to object-oriented and functional software. For you, yes. DDD may very well be overrated.

What is a domain-driven design in layman's terms? ›

Domain-Driven Design (DDD) is a software development philosophy that emphasizes the importance of understanding and modeling the business domain. It is a strategy aimed at improving the quality of software by aligning it more closely with the business needs it serves.

What are the core concepts of DDD? ›

The core concepts of DDD—Entities, Value Objects, Aggregates, Domain Events, Services, and Commands—serve as the pillars of this approach. Let's delve into each concept with detailed examples from a Learning Management System (LMS), illustrating how they can be applied to model such a domain comprehensively.

What is the difference between MVC and DDD? ›

DDD emphasizes collaboration between technical experts and domain experts to create a shared understanding of the domain, which leads to a more robust and meaningful design. Unlike MVC and MVP, DDD encourages the use of domain models, aggregates, and repositories, aligning the software closely with the business domain.

What is the difference between DDD and architecture? ›

In summary, while DDD focuses on modeling the problem domain to align software with business needs, Clean Architecture is concerned with organizing code in a way that enhances maintainability, testability, and adaptability.

What is the difference between BDD and DDD? ›

In conclusion, TDD, BDD, and DDD are all popular approaches to software development that have their strengths and weaknesses. TDD focuses on testing the code, BDD focuses on the behavior of the software, and DDD focuses on the domain of the software.

Is DDD still a thing? ›

It is still very much a thing. It's worth a comment though on what it's appropriate to use for.

When should we use DDD? ›

DDD works best when applied to large, complex systems. A surprising number of the systems Software engineers write today are basic CRUD (short for create, read, update, and delete) applications.

What is the best language for DDD? ›

F#, a mature and versatile functional programming language, is particularly well-suited to implement DDD. In this article, we will explore the benefits of using Domain-Driven Design with F# and functional programming.

What is domain model in simple words? ›

A domain model is a system of abstractions that describes selected aspects of a sphere of knowledge, influence or activity (a domain). The model can then be used to solve problems related to that domain.

What is a real world example of domain-driven design? ›

Netflix is a prime example of successfully adopting DDD and microservices. By employing microservices, Netflix has divided its vast system into smaller, autonomous services like user management, content recommendation, billing, and more.

How to understand DDD? ›

Domain Driven Design (DDD) is an architectural pattern that helps us understand the software that we are building by modeling the classes based on business requirements. DDD is not about technology. Instead, its all about understanding the problem you're to solve in a business context.

What is the full meaning of DDD? ›

1)DDD - Degenerative Disc Disease. 2) DDD - Defined Daily Dose.

Top Articles
Using Big Data Analytics in Forex Trading | FXOpen
Wearing the kippah and tallith - Practices - GCSE Religious Studies Revision - WJEC - BBC Bitesize
Omega Pizza-Roast Beef -Seafood Middleton Menu
Mickey Moniak Walk Up Song
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Wmu Course Offerings
Women's Beauty Parlour Near Me
Autobell Car Wash Hickory Reviews
Farmers Branch Isd Calendar
Chastity Brainwash
Culvers Tartar Sauce
Robert Malone é o inventor da vacina mRNA e está certo sobre vacinação de crianças #boato
Los Angeles Craigs List
Summer Rae Boyfriend Love Island – Just Speak News
Playgirl Magazine Cover Template Free
N2O4 Lewis Structure & Characteristics (13 Complete Facts)
Effingham Bookings Florence Sc
Why Is 365 Market Troy Mi On My Bank Statement
Water Trends Inferno Pool Cleaner
Nhl Tankathon Mock Draft
[Cheryll Glotfelty, Harold Fromm] The Ecocriticism(z-lib.org)
Quick Answer: When Is The Zellwood Corn Festival - BikeHike
Sea To Dallas Google Flights
Military life insurance and survivor benefits | USAGov
Bellin Patient Portal
Kitchen Exhaust Cleaning Companies Clearwater
Wolfwalkers 123Movies
Chelsea Hardie Leaked
What we lost when Craigslist shut down its personals section
Murphy Funeral Home & Florist Inc. Obituaries
Mta Bus Forums
Restored Republic December 9 2022
Captain Billy's Whiz Bang, Vol 1, No. 11, August, 1920
America's Magazine of Wit, Humor and Filosophy
Google Flights Orlando
This 85-year-old mom co-signed her daughter's student loan years ago. Now she fears the lender may take her house
Cpmc Mission Bernal Campus & Orthopedic Institute Photos
Other Places to Get Your Steps - Walk Cabarrus
Exam With A Social Studies Section Crossword
UT Announces Physician Assistant Medicine Program
Po Box 101584 Nashville Tn
What is a lifetime maximum benefit? | healthinsurance.org
Barback Salary in 2024: Comprehensive Guide | OysterLink
Craiglist.nj
Cryptoquote Solver For Today
Sleep Outfitters Springhurst
Congressional hopeful Aisha Mills sees district as an economical model
sin city jili
Chitterlings (Chitlins)
How Did Natalie Earnheart Lose Weight
Pauline Frommer's Paris 2007 (Pauline Frommer Guides) - SILO.PUB
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 6373

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.