
Intro to DDD Session 1
Presentation
•
Education
•
•
Practice Problem
•
Hard
Mohamed Essam
Used 2+ times
FREE Resource
22 Slides • 4 Questions
1
Domain-Driven Design
• The Domain Model is the “heart” of an application.
• An increase of complexity is often caused by a poorly designed model.
2
Domain
A sphere of knowledge, influence, or activity. The subject
area to which the user applies a program is the domain of
the software.
3
Model
A system of abstractions that describes selected aspects
of a domain and can be used to solve problems related to
that domain.
4
Domain Model
• Contains the “concepts” used in the client’s domain that are used to solve a
specific problem
• Never contains a concept that the client doesn’t care about
• Remember it’s a model!
5
Domain
6
Model
7
Model
8
Entity
Objects that are not fundamentally defined by their
attributes, but rather by a thread of continuity and
identity.
9
Value Object
Value objects have no conceptual identity, but are
fundamentally defined by their attributes.
They describe some characteristic of a thing.
Value Objects are Immutable.
10
Multiple Choice
Human Being is ...
Value Object
An Entity
It depends
NONE
11
It Depends
12
Multiple Choice
1 Euro Bill is ...
Value Object
An Entity
It depends
NONE
13
It Depends
14
Multiple Choice
Does this Code describe Value objects or Entities?
Bucket literOfRed = new Bucket(1L, Color.RED);
Bucket literOfWhite = new Bucket(1L, Color.WHITE);
literOfRed.add(literOfWhite);
// now literOfRed contains 2 liters…. Of PINK!
// and literOfWhite… Empty! Or is it?
Entities
Value Objects
It Depends!
15
Multiple Choice
Does this Code describe Value objects or Entities?
Bucket literOfRed = new Bucket(1L, Color.RED);
Bucket literOfWhite = new Bucket(1L, Color.WHITE);
Bucket lotsOfPink = literOfRed.mixedWith(literOfWhite);
// “magically” a new bucket appears ☺
Bucket evenMorePaint = newBucket.mixedWith(literOfWhite);
Entities
Value Objects
It Depends!
16
Repository
A mechanism for encapsulating storage, retrieval, and
search behavior which emulates a collection of objects.
17
Aggregate
A group of associated objects which are considered as
one unit with regard to data changes…
18
Aggregate
External references are restricted to one member of the
aggregate, designated as the Root.
A set of consistency rules applies within the Aggregate’s
boundaries.
19
Where is the boundary?
20
Event
A notification that something relevant has happened
inside the domain.
21
Adding structure to the Model
22
Bounded Context
Explicitly define the context within which a model applies. Explicitly set
boundaries in terms of team organization, usage within specific parts of the
application, and physical manifestations such as code bases and database
schemas. Keep the model strictly consistent within these bounds, but don’t
be distracted or confused by issues outside.
23
Bounded Context
2. Define boundaries (team organization, usage, physical form).
3. Keep model strictly consistent within bounds.
4. Don’t be distracted by outside ideas/solutions.
1. Construct your model.
24
Ground crew
Passenger
Example - Flight
Flight number
Arrival time
Turn-around time
Flight number
Check-in deadline
Luggage allowance
Flight number
Crewmates
Service schedule
Cabin crew
“Flight”
25
Adding structure to the Model
26
Adding structure to the Model
Domain-Driven Design
• The Domain Model is the “heart” of an application.
• An increase of complexity is often caused by a poorly designed model.
Show answer
Auto Play
Slide 1 / 26
SLIDE
Similar Resources on Wayground
20 questions
Renaissance Europe
Presentation
•
9th - 10th Grade
21 questions
NEASC Extended Advisory
Presentation
•
9th - 12th Grade
20 questions
Composition & Design Elements in Photography
Presentation
•
9th - 12th Grade
19 questions
Topic 4 - Interests - Session#1
Presentation
•
8th Grade
21 questions
Robotics
Presentation
•
8th - 12th Grade
23 questions
Writing: Structure of a paragraph
Presentation
•
University
23 questions
Reported Speech
Presentation
•
University
20 questions
Identifying Tone
Presentation
•
8th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade
Discover more resources for Education
52 questions
FAST Reading Lesson
Presentation
•
3rd Grade
16 questions
Equivalent Fractions
Quiz
•
5th Grade
10 questions
Adjectives
Quiz
•
3rd Grade
16 questions
4th Grade Test Prep - From Jeopardy Game
Quiz
•
4th Grade
12 questions
3rd Grade Editing and Revising Practice Quiz
Quiz
•
3rd Grade
10 questions
Discover Your Career Personality Type
Interactive video
•
7th Grade
15 questions
Chapter 11 - Medication and Drug Use and Abuse
Quiz
•
6th - 8th Grade
15 questions
Homophones
Quiz
•
3rd Grade