3 ms·
More ceremony & semantic load of course and you end up with having to define single use abstractions so that you can mock them in tests I've long been in the p
by rraghur 6y ago
More ceremony & semantic load of course and you end up with having to define single use abstractions so that you can mock them in tests
I've long been in the pro DI camp and used to think that interfaces and brittle tests were unavoidable..
Only after i recently got into FP with f#, I've come to appreciate how i used to conflate good IoC design with DI usage.. I'm pretty sure that I'm not alone
- jolux 6y agoIf you find yourself creating a lot of single-use abstractions, I think you're probably doing something wrong. In particular a lot of containers (I know Autofac) support Func<> very well. As for ceremony and semantic load, I can't argue here, though I think following DI restricts some of the semantic load that comes with abstracting mainly through inheritance and through managing stateful dependencies.