[skip ci] add doc about modules

This commit is contained in:
ansgarz 2024-09-06 22:30:01 +02:00
parent 343c339a5a
commit bb9146b542
2 changed files with 20 additions and 0 deletions

20
doc/Modularization.md Normal file
View file

@ -0,0 +1,20 @@
# Modules
## Modules and their possible relations
![modularization.png](resources/modularization.png)
#### Modules
A,B,C: Modules with both domain and infrastructure layer code - common type of modules
D: Module with only domain: can sometimes make sense if only domain logic and no infrastructure logic is required
E: Module with only infrastructure: usually utility modules that just provide a collection of infrastructure functionality
#### Interactions
1. Domain calls (a function in) the infrastructure of the same module - common practice within a module
1. Domain calls (a function in) the domain another module - common practice between modules
1. Infrastructure calls infrastructure of another module - usually not recommended
1. Domain calls infrastructure in another module - can make sense in some cases e.g. if module D just needs some low-level function of module D. However where possible calling domain of module C should be preferred
1. Domain calls infrastructure in another module, which only has infrastructure - common practice for calling utility modules, which don't have a domain.

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB