-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
192 lines (186 loc) · 6.51 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>DDD Architecture</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/sky.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
<style>
.twocolumn {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 10px;
text-align: left;
}
.text-center {
text-align: center;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section><h2>Domain Driven Design (DDD)</h2></section>
<section>
<h3>Domain Driven Design (DDD)</h3>
<div>
<p>Two aspects:</p>
<ul>
<li>Decomposing the Application</li>
<li>Layered Architecture</li>
</ul>
</div>
<br />
<br />
<p class="fragment">Today we're talking about Layered architecture</p>
</section>
<section>
<h2>Decomposing the Application</h2>
<p>Talk about after the demo if time.</p>
</section>
<section>
<section><h3>DDD - Layered Architecture</h3></section>
<section>
<h3>Lots of names for this</h3>
<ul>
<li>Clean Architecture</li>
<li>Onion Architecture</li>
<li>Hexagonal Architecture</li>
<li>Ports and Adapters</li>
</ul>
</section>
<section>
<p>Each layer communicates with immediate adjacent layer, all dependencies flow inward.</p>
<img src="./img/onion-architecture.png">
</section>
<section>
<h2>Why should the business care?</h2>
<ul>
<li>The business wants a sustainable product</li>
<li>Avoids the big ball of mud that codebases can turn into if boundaries are not clearly defined</li>
<li>Easier to test at each layer of the app.</li>
</ul>
</section>
<section><h2>This is not about quick wins, it's an investment into the future</h2><p class="fragment">...10 years from now</p></section>
<section>
<h2>Why do developers care?</h2>
<ul>
<li>Follows SOLID principles</li>
<li>Single Responsibility Classes at each layer</li>
<li>Easier to test classes (smaller units to test)</li>
<li>Domain knows nothing about implementation details (i.e. Database)</li>
<li>Swappable outer layers (i.e. database) without changing inner layers (i.e. usecases and domain objects).</li>
</ul>
</section>
<section>
<img src="img/cone.jpeg">
</section>
</section>
<section>
<section>
<h2>How?</h2>
<p>Every service will implement these directories: Data, Usecases, Domain</p>
<img src="img/top-level-directories.png" />
</section>
<section>
<p>Data - holds all classes pertaining to data access, transformation, transfer, etc...</p>
<img src="img/data-folder.png" />
</section>
<section>
<p>Usecases - holds all classes pertaining to a single use case, Controller, Usecase, Subscriber</p>
<img src="img/usecases.png" />
</section>
<section>
<p>Domain - holds Entities, Value Objects, Respository Interface (not impl of repo)</p>
<img src="img/domain-folder.png" />
</section>
<section>
<h2>Entities and Value Objects</h2>
<ul>
<li>All business invariants are encapsulated in Domain Objects</li>
<li>Validation is next to the data it represents</li>
<li>DTO's should be converted to Domain Objects coming into Use Case</li>
<li>Domain Objects should be converted to DTO's going out of Use Case</li>
</ul>
</section>
<section>
<h2>Use Cases should always work with Domain Objects</h2>
<small>So that invariants are enforced</small>
</section>
</section>
<section><h2>Demo</h2></section>
<section>
<section>
<h3>DDD - Bounded Contexts</h3>
<ul>
<li>Typically map to independent microservices</li>
</ul>
</section>
<section>
<h3>Example - Decomposing LNG</h3>
<ul>
<li>CMS</li>
<li>Metrics</li>
<li>Document Storage</li>
<li>Page Builder</li>
<li>etc...</li>
</ul>
<p class="fragment">This is up for debate, this is technical decomposition not business decomposition</p>
</section>
<section>
<h3>Domains should be decomposed by business process</h3>
<ul>
<li>Look at the business process</li>
<li>Look at specific use cases of the process.</li>
<li>Derive the subdomains around business units/groups</li>
<li>or, Derive the subdomains around core entity of the business unit</li>
</ul>
</section>
<section>
<h3>Example - Business Process</h3>
<ol>
<li>Knowledge Worker submits content to LH</li>
<li>Content Moderator reviews content and requests changes or approves for publishing</li>
<li>Subject Matter Experts curate content around particular topics into single space</li>
<li>Knowledge Seeker can view curated content around specific subject</li>
<li>Knowledge Seeker can use full text search to find content</li>
</ol>
</section>
<section>
<h3>Example - Business Process Domains</h3>
<ol>
<li>CMS Subdomain - Knowledge Worker submits content</li>
<li>Moderation Subdomain - Content Moderator reviews content</li>
<li>Spaces Subomain - Subject Matter Experts curates content into space</li>
<li>Spaces Subomain - Knowledge Seeker can view curated content for specific subject</li>
<li>Search Subdomain - Knowledge Seeker can (cognitive) search to find content</li>
</ol>
</section>
<section>
<h3>We should work with a business analyst</h3>
<small>(business process was contrived for illustration)</small>
</section>
</section>
<section><h3>Questions?</h3></section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>
</body>
</html>