2 ms·
When the added costs of integrating a DI framework (added complexity, getting the rest of the team up to speed and debugging problems directly related to the fr
by swanson 15y ago
When the added costs of integrating a DI framework (added complexity, getting the rest of the team up to speed and debugging problems directly related to the framework) does not provide sufficient value. This could be the case for smaller projects or a system that doesn't have classes with more than 1-2 dependencies.
You can always get away with using "sinful hacks" (in the eyes of some DI evangelists) like wrapping dependencies in a getter/setter if you just want to inject a mock version for testing.