0% found this document useful (0 votes)
34 views14 pages

DomainDrivenDesign 02

Uploaded by

JonatasAfonso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views14 pages

DomainDrivenDesign 02

Uploaded by

JonatasAfonso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

TRAINING CENTER

Domain Driven Design


Module 2
Ta t i c a l D o m a i n - D r i v e n D e s i g n
D o m a i n D r i v e n D e s i g n

Module Overview

Entities

Value Objects

Aggregates

Domain Services

Factories

1
D o m a i n D r i v e n D e s i g n

Introduction
Eric Evans
DDD Author

“DDD can be divided into Strategic and Tactical Design where the Tactical Design is about the building blocks
of DDD.”

2
D o m a i n D r i v e n D e s i g n

Entities
Eric Evans
DDD Author

“Many objects are not fundamentally defined by their attributes, but rather by a
thread of continuity and identity.”
“An object primarily defined by its identity is called an Entity.”

3
D o m a i n D r i v e n D e s i g n

Va l u e O b j e c t s
Eric Evans
DDD Author

“Many objects have no conceptual identity. These objects describe some


characteristics of a thing.”
“An object that represents a descriptive aspect of the domain with no conceptual
identity is called a Value Object. Value Objects are instantiated to represent
elements of the design that we care about only for what they are, not who or which
they are..”

4
D o m a i n D r i v e n D e s i g n

E n t i t i e s v s Va l u e O b j e c t s

5
D o m a i n D r i v e n D e s i g n

Aggregates
Martin Fowler
Refactoring Author

“Aggregate is a pattern in Domain-Driven Design. A DDD aggregate is a cluster of


domain objects that can be treated as a single unit. An example may be an order
and its line-items, these will be separate objects, but it's useful to treat the order
(together with its line items) as a single aggregate.”
“Aggregates are the basic element of transfer of data storage - you request to load
or save whole aggregates. Transactions should not cross aggregate boundaries.”

6
D o m a i n D r i v e n D e s i g n

Aggregates

7
D o m a i n D r i v e n D e s i g n

Domain Services
Eric Evans
DDD Author

“The Domain Services are Stateless; they reflect behavior and do not have an
identity. The Domain Services contain domain logic that does not belong to an
Entity or Value Object.”

8
D o m a i n D r i v e n D e s i g n

Domain Services

9
D o m a i n D r i v e n D e s i g n

Factories
Martin Fowler
Refactoring Author

“A commonly recognized term in object-orientated programming is Factory. A


Factory is an object that has the sole responsibility to create other objects.
Factories are not unique to Domain Driven Design, but they do hold an important
role within a Domain Driven Design project”

10
D o m a i n D r i v e n D e s i g n

Factories

11
Who else needs
some coffee ?
Domain Driven Design

12
• Mod_TR_019_R2_0118

Technical Training
Let’s do it

13

You might also like