Date: 2019-07-15
Log date: 2019-11-09
Accepted
For each module, when we process particular Command or Query, we need to resolve a graph of objects. We need to decide how dependencies of objects will be resolved.
One IoC container located in the host project.
- standard approach
- dependencies configured in one place
- couples host application with all of projects, libraries
- modules autonomy decreases
- strong coupling
Multiple IoC containers per modules.
- module autonomy
- loose coupling
- host application has dependency only to Application Service Layer
- duplicated code
- non-standard approach
Solution number 2 - IoC Container per module
IoC Container per module supports the autonomy of the module and louse coupling so this is a more important aspect for us than duplicated code in some places.
- Create and maintain an IoC Container for each module
- Implementation is not standard, but still acceptable easy
- We can add dependencies to module and other modules are intact