Domain Driven Design or DDD is a
software design principle where
developers build small models of a
large application and collaborate
with domain experts using them as
conceptual foundation for
developing software.
2. #techtuesdays
What is domain driven
design?
Domain Driven Design or DDD is a
software design principle where
developers build small models of a
large application and collaborate
with domain experts using them as
conceptual foundation for
developing software.
3. #techtuesdays
Why DDD gained importance?
Larger the domain, the more difficult
it is to find a consistent and unified
model spanning the entire domain.
DDD encourages breaking down a
domain into subdomains through
identifying bounded contexts.
4. #techtuesdays
Bounded Context (BC)
It is a boundary within which a word has definite and
unambiguous meaning. For example, the meaning of
the word “book” changes in different contexts.
Online Bookstore Domain
Catalog Context Shipment Context
Cover art
Price
Author
Reviews
Address
Zip Code
Weight
5. #techtuesdays
Context Map
Context map is the relationships between
different BC
Catalog
Cover art
Price
Author
Reviews
Shipment
Address
Zip Code
Weight
Payment
Price
Payment
Method
Storehouse
Stock
Inventory
Process
order
Check if book is
in stock
Retrieve book
from storehouse
Start
shipment
6. #techtuesdays
Phases of DDD
Strategic phase
Tactical phase
Identify the BCs and map them out in
context map.
Model each BC according to the business
rules of the subdomain.
8. #techtuesdays
Core principles and terminology
Domains Layers Gateways
A collection of
related
microservices.
A collection of
domains.
Single point
entry into the
layers.
Each domain is agnostic to the other.
Entry into a domain is only possible through a gateway.
Layers establish dependencies that a microservice is
allowed to take on.