2 ms·
The first example is also dependency injection. The rest of what you described is why a dependency injection framework often becomes useful in a system with a l
by sanderjd 4y ago
The first example is also dependency injection. The rest of what you described is why a dependency injection framework often becomes useful in a system with a large dependency tree.
The alternative to dependency injection is for functions to instantiate dependencies internally rather than having them be passed in from the calling context.