6 ms·
That multiple usages of the same concrete types requires changes on multiple places. For small programs, the di container itself can probably be skipped (i.e. i
by sharpercoder 6y ago
That multiple usages of the same concrete types requires changes on multiple places. For small programs, the di container itself can probably be skipped (i.e. instantiate an object graph by newing up). For larger programs, this is too cumbersome and therefore error-inducing.
- didibus 6y ago> That multiple usages of the same concrete types requires changes on multiple places Write a util function then, or like some like to call it, one of the many Factory pattern.
- shireboy 6y agoSo then you’re writing your own one-off DI of sorts. And you have more code to write than if you’d just used DI.