Re:Write tests. Not too many. Mostly integration
by GordonS on Friday October 27, 2017 @10:50AM
(#15568912)
This is how I felt about IoC as a junior dev 15 years ago, before I'd actually used it myself.
Nowadays the benefits are clear to me: more modular, testable code, and also lifecycle management.
Give it a try, you may well change your views.
Re:Write tests. Not too many. Mostly integration
by bpicolo on Friday October 27, 2017 @12:30PM
(#15569904)
I've used it a fair deal. I've found I prefer languages that don't require IoC to make code testable.
I agree that it's one of the sanest options when it's required, I just think that language design should incorporate testing ergonomics from the start.
For me, IoC seems invented almost entirely to make up for how difficult testing can be in particular languages. Which, sure, making up for shortcomings as good, but the necessity to use IoC for it feels bad.