Skip to content

Commit 094b48b

Browse files
committed
Merge remote-tracking branch 'origin/master' into indexing
2 parents b3a0e60 + 6e998e1 commit 094b48b

11 files changed

Lines changed: 2518 additions & 1550 deletions

chapter_01_domain_model.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ image::images/apwp_0102.png[]
126126
[plantuml, apwp_0102]
127127
@startuml Allocation Context Diagram
128128
!include images/C4_Context.puml
129+
scale 2
129130
130131
System(systema, "Allocation", "Allocates stock to customer orders")
131132
@@ -437,6 +438,8 @@ image::images/apwp_0103.png[]
437438
[role="image-source"]
438439
----
439440
[plantuml, apwp_0103, config=plantuml.cfg]
441+
@startuml
442+
scale 4
440443
441444
left to right direction
442445
hide empty members

chapter_03_abstractions.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ We can reduce the degree of coupling within((("coupling", "reducing by abstracti
5050
image::images/apwp_0301.png[]
5151
[role="image-source"]
5252
----
53-
[ditaa,apwp_0301]
53+
[ditaa, apwp_0301]
5454
+--------+ +--------+
5555
| System | ---> | System |
5656
| A | ---> | B |
@@ -66,7 +66,7 @@ image::images/apwp_0301.png[]
6666
image::images/apwp_0302.png[]
6767
[role="image-source"]
6868
----
69-
[ditaa,apwp_0302]
69+
[ditaa, apwp_0302]
7070
+--------+ +--------+
7171
| System | /-------------\ | System |
7272
| A | ---> | | ---> | B |

chapter_07_aggregate.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ image::images/apwp_0702.png[]
233233
----
234234
[plantuml, apwp_0702, config=plantuml.cfg]
235235
@startuml
236+
scale 4
236237
237238
hide empty members
238239
@@ -283,6 +284,7 @@ image::images/apwp_0703.png[]
283284
----
284285
[plantuml, apwp_0703, config=plantuml.cfg]
285286
@startuml
287+
scale 4
286288
287289
hide empty members
288290
@@ -581,6 +583,7 @@ image::images/apwp_0704.png[]
581583
----
582584
[plantuml, apwp_0704, config=plantuml.cfg]
583585
@startuml
586+
scale 4
584587
585588
entity Model
586589
collections Transaction1

chapter_09_all_messagebus.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ image::images/apwp_0904.png[]
495495
----
496496
[plantuml, apwp_0904, config=plantuml.cfg]
497497
@startuml
498+
scale 4
499+
498500
API -> MessageBus : BatchQuantityChanged event
499501
500502
group BatchQuantityChanged Handler + Unit of Work 1

chapter_11_external_events.asciidoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ image::images/apwp_1103.png[]
8787
----
8888
[plantuml, apwp_1103, config=plantuml.cfg]
8989
@startuml
90+
scale 4
9091
9192
actor Customer
9293
entity Orders
@@ -163,6 +164,7 @@ image::images/apwp_1104.png[]
163164
----
164165
[plantuml, apwp_1104, config=plantuml.cfg]
165166
@startuml
167+
scale 4
166168
167169
actor w as "Warehouse worker"
168170
entity Warehouse
@@ -215,6 +217,7 @@ image::images/apwp_1105.png[]
215217
----
216218
[plantuml, apwp_1105, config=plantuml.cfg]
217219
@startuml
220+
scale 4
218221
219222
actor Customer
220223
entity Orders
@@ -333,8 +336,8 @@ image::images/apwp_1106.png[]
333336
[role="image-source"]
334337
----
335338
[plantuml, apwp_1106, config=plantuml.cfg]
336-
337339
@startuml
340+
scale 4
338341
339342
Redis -> MessageBus : BatchQuantityChanged event
340343

chapter_12_cqrs.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,9 @@ image::images/apwp_1202.png[]
688688
----
689689
[plantuml, apwp_1202, config=plantuml.cfg]
690690
@startuml
691+
scale 4
691692
!pragma teoz true
693+
692694
actor User order 1
693695
boundary Flask order 2
694696
participant MessageBus order 3

chapter_13_dependency_injection.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ image::images/apwp_1303.png[]
241241
[ditaa, apwp_1303]
242242
243243
+---------------+
244-
| Entrpyoints |
244+
| Entrypoints |
245245
| (Flask/Redis) |
246246
+---------------+
247247
|

epilogue_1_how_to_get_there_from_here.asciidoc

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ image::images/apwp_ep01.png[]
6565
----
6666
[plantuml, apwp_ep01, config=plantuml.cfg]
6767
@startuml
68+
scale 4
6869
hide empty members
70+
6971
Workspace *- Folder : contains
7072
Account *- Workspace : owns
7173
Account *-- Package : has
@@ -264,78 +266,75 @@ image::images/apwp_ep02.png[]
264266
----
265267
[plantuml, apwp_ep02, config=plantuml.cfg]
266268
@startuml
269+
scale 4
267270
hide empty members
268271
269-
class Document {
270-
271-
add_version ()
272-
273-
workspace: Workspace
274-
parent: Folder
275-
276-
versions: List[DocumentVersion]
277-
272+
together {
273+
class Document {
274+
add_version()
275+
workspace: Workspace
276+
parent: Folder
277+
versions: List[DocumentVersion]
278+
279+
}
280+
281+
class DocumentVersion {
282+
title : str
283+
version_number: int
284+
document: Document
285+
286+
}
287+
class Folder {
288+
parent: Workspace
289+
children: List[Folder]
290+
copy_to(target: Folder)
291+
add_document(document: Document)
292+
}
278293
}
279294
280-
class DocumentVersion {
281-
282-
title : str
283-
version_number: int
295+
together {
296+
class User {
297+
account: Account
298+
}
284299
285-
document: Document
286300
287-
}
288-
289-
class Account {
290-
add_package ()
291-
292-
owner : User
293-
packages : List[BillingPackage]
294-
workspaces: List[Workspace]
301+
class Account {
302+
add_package()
303+
owner : User
304+
packages : List[BillingPackage]
305+
workspaces: List[Workspace]
306+
}
295307
}
296308
297309
298310
class BillingPackage {
299311
}
300312
301313
class Workspace {
302-
303314
add_member(member: User)
304-
305315
account: Account
306316
owner: User
307317
members: List[User]
308-
309318
}
310319
311-
class Folder {
312-
parent: Workspace
313-
children: List[Folder]
314-
315-
copy_to(target: Folder)
316-
add_document(document: Document)
317-
}
318320
319-
class User {
320-
account: Account
321-
}
322321
323322
Account --> Workspace
324-
Account --> BillingPackage
325-
Account --> User
323+
Account -left-> BillingPackage
324+
Account -right-> User
326325
Workspace --> User
327326
Workspace --> Folder
328327
Workspace --> Account
329328
Folder --> Folder
330329
Folder --> Document
331330
Folder --> Workspace
332331
Folder --> User
333-
Document --> DocumentVersion
332+
Document -right-> DocumentVersion
334333
Document --> Folder
335334
Document --> User
336-
DocumentVersion --> Document
335+
DocumentVersion -right-> Document
337336
DocumentVersion --> User
338-
User --> Account
337+
User -left-> Account
339338
340339
@enduml
341340
@@ -348,13 +347,14 @@ image::images/apwp_ep03.png[]
348347
----
349348
[plantuml, apwp_ep03, config=plantuml.cfg]
350349
@startuml
350+
scale 4
351351
hide empty members
352352
353353
frame Document {
354354
355355
class Document {
356356
357-
add_version ()
357+
add_version()
358358
359359
workspace_id: int
360360
parent_folder: int
@@ -374,7 +374,7 @@ frame Document {
374374
frame Account {
375375
376376
class Account {
377-
add_package ()
377+
add_package()
378378
379379
owner : int
380380
packages : List[BillingPackage]
@@ -481,14 +481,17 @@ image::images/apwp_ep04.png[]
481481
@startuml Ecommerce Context
482482
!include images/C4_Context.puml
483483
484+
LAYOUT_LEFT_RIGHT
485+
scale 2
486+
484487
Person_Ext(customer, "Customer", "Wants to buy furniture")
485488
486-
System(fulfilment, "Fulfilment System", "Manages order fulfilment and logistics")
489+
System(fulfillment, "Fulfillment System", "Manages order fulfillment and logistics")
487490
System(ecom, "Ecommerce website", "Allows customers to buy furniture")
488491
489492
Rel(customer, ecom, "Uses")
490-
Rel(fulfilment, ecom, "Updates stock and orders", "xml-rpc")
491-
Rel(ecom, fulfilment, "Sends orders", "xml-rpc")
493+
Rel(fulfillment, ecom, "Updates stock and orders", "xml-rpc")
494+
Rel(ecom, fulfillment, "Sends orders", "xml-rpc")
492495
493496
@enduml
494497
----
@@ -504,17 +507,20 @@ image::images/apwp_ep05.png[]
504507
@startuml Ecommerce Context
505508
!include images/C4_Context.puml
506509
510+
LAYOUT_LEFT_RIGHT
511+
scale 2
512+
507513
Person_Ext(customer, "Customer", "Wants to buy furniture")
508514
509515
System(av, "Availability Service", "Calculates stock availability")
510-
System(fulfilment, "Fulfilment System", "Manages order fulfilment and logistics")
516+
System(fulfillment, "Fulfillment System", "Manages order fulfillment and logistics")
511517
System(ecom, "Ecommerce website", "Allows customers to buy furniture")
512518
513519
Rel(customer, ecom, "Uses")
514520
Rel(customer, av, "Uses")
515-
Rel(fulfilment, av, "Publishes batch_created", "events")
521+
Rel(fulfillment, av, "Publishes batch_created", "events")
516522
Rel(av, ecom, "Publishes out_of_stock", "events")
517-
Rel(ecom, fulfilment, "Sends orders", "xml-rpc")
523+
Rel(ecom, fulfillment, "Sends orders", "xml-rpc")
518524
519525
@enduml
520526
----
@@ -733,16 +739,14 @@ image::images/apwp_ep06.png[]
733739
@startuml View Fetcher Component Diagram
734740
!include images/C4_Component.puml
735741
736-
LAYOUT_LEFT_RIGHT
737-
738742
ComponentDb(db, "Database", "RDBMS")
739743
Component(fetch, "View Fetcher", "Reads data from db, returning list of tuples or dicts")
740744
Component(build, "View Builder", "Filters and maps tuples")
741745
Component(api, "API", "Handles HTTP and serialization concerns")
742746
743-
Rel(fetch, db, "Read data from")
744-
Rel(build, fetch, "Invokes")
745747
Rel(api, build, "Invokes")
748+
Rel_R(build, fetch, "Invokes")
749+
Rel_D(fetch, db, "Reads data from")
746750
747751
@enduml
748752
----

introduction.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ One of the most common examples is the _three-layered architecture_ shown in
176176
image::images/apwp_0002.png[]
177177
[role="image-source"]
178178
----
179-
[ditaa,apwp_0002]
179+
[ditaa, apwp_0002]
180180
+----------------------------------------------------+
181181
| Presentation Layer |
182182
+----------------------------------------------------+

0 commit comments

Comments
 (0)