2 ms·
I've been rather skeptical of the Java community's rush toward inversion of control and dependency inversion, myself. It spawns a mass of interfaces, the vast m
by johan_larson 12y ago
I've been rather skeptical of the Java community's rush toward inversion of control and dependency inversion, myself. It spawns a mass of interfaces, the vast majority of which have only one implementation. So you are usually adding a layer of abstraction without accomplishing anything.
The approach I favor is to identify seams and abstraction boundaries at a higher level, corresponding to larger units of functionality. Then carefully define interfaces between these larger units, and build mocks for them for testability. But having defined interfaces for every class, or even close to every class, is overkill.