I've read lots of things that tell me that Inversion of Control / Dependency Injection yeild better design. My question is whether this is always the case. To me, a model that uses Dependency Injection all over the place is less clean than one that doesn't. Sure - there are some obvious benefits in several areas, and I might even conceed that Dependency Injection is necessary, if only for enabling unit testing (although I don't like it) - but to say it is always a good thing, I don't understand. What benefits am I missing here?
Inversion of Control/Dependency Injection (or DI as we call it) does generally yield better results but there are, as you point out, limits to how far a system can be tuned using DI. It's not always a good thing. Better to be safe that sorry. Perhaps you need to look at Double Inversion methods.
no idea
Inversion of Control/Dependency Injection (or DI as we call it) does generally yield better results but there are, as you point out, limits to how far a system can be tuned using DI. It's not always a good thing. Better to
be safe that sorry. Perhaps you need to look at Double Inversion methods.