Skip to content
BENIBIX Learn

Domain-Driven Design (DDD)

Development🏗️ ArchitectureArchitecture Styles

Also known as DDD, Bounded Context, Ubiquitous Language

Code that uses the same words as the business it serves.

Think of it like

Think of it like a builder who learns how a family lives. Then they draw the house.

Example

Emma's team works with a shipping firm. Its staff say consignment, not order, so the code says Consignment too. Meetings and code now use the same words.

Why it matters

Most costly bugs start when two groups mean different things by one word.

Definition

Domain-driven design is a way to build software around the words of the business. Coders and business experts agree on one set of words. The code uses those same words. A big system is split into bounded contexts, areas where each word has one clear meaning. A customer in billing and one in shipping can then be different things. Eric Evans set out the idea in a 2003 book.

Common mistake

Copying the patterns from the book without talking to the business. The shared words are the point, not the class names.

Key takeaways

  1. 1
    One shared language. In talk and in code.
  2. 2
    Bounded contexts. Each word, one meaning.
  3. 3
    Learn the business. Before the code.