More Related Content Similar to [2020 DDD TW Conference Workshop] Go Ahead DDD Tactical Modeling (20) [2020 DDD TW Conference Workshop] Go Ahead DDD Tactical Modeling1. DDD
DDD TW 2020 Conference
Eason Kuo
v6610688@gmail.com
Facebook : Eason
Telegram : @kokokuo
15. Bounded Context .
2 1 ES Aggregate /
3 Domain Models
• Value Object
• Entity
• Aggregate Root
DDD DDD
3
Value Object,
Entity,
Aggregate Root
21. ) ) (
• (Onion Architecture)
• (Hexagonal Architecture)
• Clean Architecture)
• (
30. – 8 GO !
• Bounded Context Aggregate Miro
4
• Step1 :
• Step2 : Bounded Context
• Step3 : (e.g : API,
Application, Domain, Infrastructure)
• Step4 : Domain Aggregate
• PS: Bounded Context
Aggregate …
•
35. Aggregate ( )
• Aggregate
(Entity) (Value Object)
<Entity>
Entity Value Object
Aggregate
Value Object
0…N
0…N
0…N
43. – 10 GO !
• PS: Bounded Context
Aggregate …
•
• BC Aggregate Domain
Expert Miro
• Clue 1 Aggregate
• Clue 2 Aggregate Read Model
• Miro
• Clue 3 Domain Expert
49. Value Object – )
Toyota VIOS 5
3.5 L
48 / (
1200 0989-123-383 …
… ( … / 3 /
…
/ …
• ( /
50. Value Object – )
( / 3 /
…
/
Toyota VIOS 5
… 3.5 L
48 / (
1200 0989-123-383
• / / )
51. Value Object – (
) / 3 /
/
( Toyota VIOS 5
3.5 L
48 / )
1200 0989-123-383 …
•
52. Value Object – (
•
•
• /
•
•
•
•
(VO)
•
•
(VO)
•
•
(VO)
•
•
•
(VO)
•
•
•
•
(VO)
Value Object )
Value Object
56. • Aggregate Value Object
Grouping.
Step 2 : Grouping ( )
Step 3 : Grouping Value Object.
Aggregate Value Object ( )
57. – 10 GO !
• Aggregate Value Object
Grouping.
Step 1
Step 2 : Grouping ( )
Step 3 : Grouping Value Object.
Sample :
74. Q : Entity Value Object ?
Q1 : Entity Value Object
Q2: Entity Value Object
Q3: Entity
Value Object
80. – 10 Go !
• Aggregate Entity
Step 1
Step 2
Step 3 Value Object
Step 4 Entity
Step 5 Entity Value Object
Sample :
85. Entity – Value Object
• Entity Value Object
•
• Unique ID Value Object
•
•
•
98. Entity Aggregate ( )
• Aggregate Entity
Aggregate Root
Step 1 Entity
Step 2
Aggregate (Aggregate Root )
99. Entity Aggregate ( )
• Aggregate Entity
Aggregate Root
Challenge Entity
Reason 1 ES Aggregate Aggregate
Reason 2 Entity Entity ? Aggregate Root
Reason 3 Entity ? Aggregate
Root
100. – 5
• Aggregate Entity
Aggregate Root
Step 1 Entity
Step 2
Aggregate (Aggregate Root )
Challenge Entity
Reason 1 ES Aggregate Aggregate
Reason 2 Entity Entity ? Aggregate Root
Reason 3 Entity ? Aggregate Root
101. (Aggregate Root)
• E.g : Order Entity Aggregate Root
• Aggregate Entity
Entity Aggregate Root
• Aggregate Entity
•
• Aggregate
• ES Aggregate (Command)
Aggregate Root
• Entity
109. Aggregate
1.Check Order in DB Version == 0
2.Check Total > 250
3.Update Update Order & OrderItem
Version 0: Order Total = 330.
1.Check Order in DB Version == 0 (Error)
2. Rollback
Version 1: Order Total = 270.
113. Aggregate .
1 Domain Model 3
Domain Model 2
3 Domain Model
Aggregate Root, Entity, Value Object
Aggregate
Aggregate
114. Recap
•
• Value Object
• Entity
• DDD
• Aggregate Root Aggregate Entity, Value Object
• Aggregate ) Entity, Value Object
( )