News for hackers. Stuff that matters.
Re:Ask HN: When "not" to use Dependency Injection? by swanson on Saturday March 31, 2012 @06:50PM (#3781818)
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.

There are no comments on this comment yet.