1+ < html lang ="en ">
2+ < head >
3+ < meta charset ="UTF-8 ">
4+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < meta name ="generator " content ="Asciidoctor 2.0.10 ">
7+ < title > Summary Diagram and Table</ title >
8+ < style >
9+ /* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
10+
11+ @import url ("//fonts.googleapis.com/css?family=Noto+Sans:300,600italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700" );
12+ @import url (//asciidoctor.org/stylesheets/asciidoctor.css); /* Default asciidoc style framework - important */
13+
14+ /* customisations by harry */
15+
16+ /* hide inline ditaa/plantuml source listings for images */
17+ .image-source {
18+ display : none
19+ }
20+ /* make formal codeblocks a bit nicer */
21+ .exampleblock > .content {
22+ padding : 2px ;
23+ background-color : white;
24+ border : 0 ;
25+ margin-bottom : 2em ;
26+ }
27+
28+ .exampleblock .title {
29+ text-align : right;
30+ }
31+
32+ /* end customisations by harry */
33+
34+ /* CUSTOMISATIONS */
35+
36+ /* Change the values in root for quick customisation. If you want even more fine grain... venture further. */
37+
38+ : root {
39+ --maincolor : # FFFFFF ;
40+ --primarycolor : # 2c3e50 ;
41+ --secondarycolor : # ba3925 ;
42+ --tertiarycolor : # 186d7a ;
43+ --sidebarbackground : # CCC ;
44+ --linkcolor : # b71c1c ;
45+ --linkcoloralternate : # f44336 ;
46+ --white : # FFFFFF ;
47+ --black : # 000000 ;
48+ }
49+
50+ /* Text styles */
51+ h1 {color : var (--primarycolor ) !important ;}
52+ h2 , h3 , h4 , h5 , h6 {color : var (--secondarycolor ) !important ;}
53+ .title {color : var (--tertiarycolor ) !important ; font-family : "Noto Sans" , sans-serif !important ;font-style : normal !important ; font-weight : normal !important ;}
54+ p {font-family : "Noto Sans" , sans-serif !important }
55+
56+ /* Table styles */
57+ th {font-family : "Noto Sans" , sans-serif !important }
58+
59+ /* Responsiveness fixes */
60+ video {
61+ max-width : 100% ;
62+ }
63+
64+ @media all and (max-width : 600px ) {
65+ table {
66+ width : 55vw !important ;
67+ font-size : 3vw ;
68+ }
69+
70+ </ style >
71+ </ head >
72+ < body class ="article toc2 toc-left ">
73+ < div id ="header ">
74+ < div id ="toc " class ="toc2 ">
75+ < div id ="toctitle "> Table of Contents</ div >
76+ < ul class ="sectlevel1 ">
77+ < li > < a href ="/book/preface.html "> Preface</ a > </ li >
78+ < li > < a href ="/book/introduction.html "> Introduction</ a > </ li >
79+ < li > < a href ="/book/part1.html "> Building an Architecture to Support Domain Modeling</ a > </ li >
80+ < li > < a href ="/book/chapter_01_domain_model.html "> 1. Domain Modeling</ a > </ li >
81+ < li > < a href ="/book/chapter_02_repository.html "> 2. Repository Pattern</ a > </ li >
82+ < li > < a href ="/book/chapter_03_abstractions.html "> 3. A Brief Interlude: On Coupling < span class ="keep-together "> and Abstractions</ span > </ a > </ li >
83+ < li > < a href ="/book/chapter_04_service_layer.html "> 4. Our First Use Case: < span class ="keep-together "> Flask API and Service Layer</ span > </ a > </ li >
84+ < li > < a href ="/book/chapter_05_high_gear_low_gear.html "> 5. TDD in High Gear and Low Gear</ a > </ li >
85+ < li > < a href ="/book/chapter_06_uow.html "> 6. Unit of Work Pattern</ a > </ li >
86+ < li > < a href ="/book/chapter_07_aggregate.html "> 7. Aggregates and Consistency Boundaries</ a > </ li >
87+ < li > < a href ="/book/part2.html "> Event-Driven Architecture</ a > </ li >
88+ < li > < a href ="/book/chapter_08_events_and_message_bus.html "> 8. Events and the Message Bus</ a > </ li >
89+ < li > < a href ="/book/chapter_09_all_messagebus.html "> 9. Going to Town on the Message Bus</ a > </ li >
90+ < li > < a href ="/book/chapter_10_commands.html "> 10. Commands and Command Handler</ a > </ li >
91+ < li > < a href ="/book/chapter_11_external_events.html "> 11. Event-Driven Architecture: Using Events to Integrate Microservices</ a > </ li >
92+ < li > < a href ="/book/chapter_12_cqrs.html "> 12. Command-Query Responsibility Segregation (CQRS)</ a > </ li >
93+ < li > < a href ="/book/chapter_13_dependency_injection.html "> 13. Dependency Injection (and Bootstrapping)</ a > </ li >
94+ < li > < a href ="/book/epilogue_1_how_to_get_there_from_here.html "> Appendix A: Epilogue</ a > </ li >
95+ < li > < a href ="/book/appendix_ds1_table.html "> Appendix B: Summary Diagram and Table</ a > </ li >
96+ < li > < a href ="/book/appendix_project_structure.html "> Appendix C: A Template Project Structure</ a > </ li >
97+ < li > < a href ="/book/appendix_csvs.html "> Appendix D: Swapping Out the Infrastructure: < span class ="keep-together "> Do Everything with CSVs</ span > </ a > </ li >
98+ < li > < a href ="/book/appendix_django.html "> Appendix E: Repository and Unit of Work < span class ="keep-together "> Patterns with Django</ span > </ a > </ li >
99+ < li > < a href ="/book/appendix_validation.html "> Appendix F: Validation</ a > </ li >
100+ </ ul >
101+ </ div >
102+ </ div >
103+ < div id ="content ">
104+ < div class ="sect1 ">
105+ < h2 id ="appendix_ds1_table "> Appendix A: Summary Diagram and Table</ h2 >
106+ < div class ="sectionbody ">
107+ < div class ="paragraph ">
108+ < p > Here’s what our architecture looks like by the end of the book:</ p >
109+ </ div >
110+ < div id ="recap_diagram " class ="imageblock ">
111+ < div class ="content ">
112+ < img src ="images/apwp_aa01.png " alt ="diagram showing all components: flask+eventconsumer, service layer, adapters, domain etc ">
113+ </ div >
114+ </ div >
115+ < div class ="paragraph ">
116+ < p > < a href ="#ds1_table "> The components of our architecture and what they all do</ a > recaps each pattern and what it does.</ p >
117+ </ div >
118+ < table id ="ds1_table " class ="tableblock frame-all grid-all stretch ">
119+ < caption class ="title "> Table 1. The components of our architecture and what they all do</ caption >
120+ < colgroup >
121+ < col style ="width: 25%; ">
122+ < col style ="width: 25%; ">
123+ < col style ="width: 50%; ">
124+ </ colgroup >
125+ < thead >
126+ < tr >
127+ < th class ="tableblock halign-left valign-top "> Layer</ th >
128+ < th class ="tableblock halign-left valign-top "> Component</ th >
129+ < th class ="tableblock halign-left valign-top "> Description</ th >
130+ </ tr >
131+ </ thead >
132+ < tbody >
133+ < tr >
134+ < td class ="tableblock halign-left valign-top " rowspan ="5 "> < div class ="content "> < div class ="paragraph ">
135+ < p > < strong > Domain</ strong > </ p >
136+ </ div >
137+ < div class ="paragraph ">
138+ < p > < em > Defines the business logic.</ em > </ p >
139+ </ div > </ div > </ td >
140+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Entity</ p > </ td >
141+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> A domain object whose attributes may change but that has a recognizable identity over time.</ p > </ td >
142+ </ tr >
143+ < tr >
144+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Value object</ p > </ td >
145+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> An immutable domain object whose attributes entirely define it. It is fungible with other identical objects.</ p > </ td >
146+ </ tr >
147+ < tr >
148+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Aggregate</ p > </ td >
149+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Cluster of associated objects that we treat as a unit for the purpose of data changes. Defines and enforces a consistency boundary.</ p > </ td >
150+ </ tr >
151+ < tr >
152+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Event</ p > </ td >
153+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Represents something that happened.</ p > </ td >
154+ </ tr >
155+ < tr >
156+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Command</ p > </ td >
157+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Represents a job the system should perform.</ p > </ td >
158+ </ tr >
159+ < tr >
160+ < td class ="tableblock halign-left valign-top " rowspan ="3 "> < div class ="content "> < div class ="paragraph ">
161+ < p > < strong > Service Layer</ strong > </ p >
162+ </ div >
163+ < div class ="paragraph ">
164+ < p > < em > Defines the jobs the system should perform and orchestrates different components.</ em > </ p >
165+ </ div > </ div > </ td >
166+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Handler</ p > </ td >
167+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Receives a command or an event and performs what needs to happen.</ p > </ td >
168+ </ tr >
169+ < tr >
170+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Unit of work</ p > </ td >
171+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Abstraction around data integrity. Each unit of work represents an atomic update. Makes repositories available. Tracks new events on retrieved aggregates.</ p > </ td >
172+ </ tr >
173+ < tr >
174+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Message bus (internal)</ p > </ td >
175+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Handles commands and events by routing them to the appropriate handler.</ p > </ td >
176+ </ tr >
177+ < tr >
178+ < td class ="tableblock halign-left valign-top " rowspan ="2 "> < div class ="content "> < div class ="paragraph ">
179+ < p > < strong > Adapters</ strong > (Secondary)</ p >
180+ </ div >
181+ < div class ="paragraph ">
182+ < p > < em > Concrete implementations of an interface that goes from our system
183+ to the outside world (I/O).</ em > </ p >
184+ </ div > </ div > </ td >
185+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Repository</ p > </ td >
186+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Abstraction around persistent storage. Each aggregate has its own repository.</ p > </ td >
187+ </ tr >
188+ < tr >
189+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Event publisher</ p > </ td >
190+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Pushes events onto the external message bus.</ p > </ td >
191+ </ tr >
192+ < tr >
193+ < td class ="tableblock halign-left valign-top " rowspan ="2 "> < div class ="content "> < div class ="paragraph ">
194+ < p > < strong > Entrypoints</ strong > (Primary adapters)</ p >
195+ </ div >
196+ < div class ="paragraph ">
197+ < p > < em > Translate external inputs into calls into the service layer.</ em > </ p >
198+ </ div > </ div > </ td >
199+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Web</ p > </ td >
200+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Receives web requests and translates them into commands, passing them to the internal message bus.</ p > </ td >
201+ </ tr >
202+ < tr >
203+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Event consumer</ p > </ td >
204+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> Reads events from the external message bus and translates them into commands, passing them to the internal message bus.</ p > </ td >
205+ </ tr >
206+ < tr >
207+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> N/A</ p > </ td >
208+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> External message bus (message broker)</ p > </ td >
209+ < td class ="tableblock halign-left valign-top "> < p class ="tableblock "> A piece of infrastructure that different services use to intercommunicate, via events.</ p > </ td >
210+ </ tr >
211+ </ tbody >
212+ </ table >
213+ </ div >
214+ </ div >
215+ </ div >
216+ < div id ="footer ">
217+ < div id ="footer-text ">
218+ Last updated 2020-03-16 11:03:29 UTC
219+ </ div >
220+ </ div >
221+ </ body >
222+ </ html >
0 commit comments