2 ms·
> if it's really required to write quality software of course it isn't. if your program doesn't require dependency injection and you architect it for dependenc
by robotkilla 12y ago
> if it's really required to write quality software
of course it isn't. if your program doesn't require dependency injection and you architect it for dependency injection, that isn't quality software.
- solutionyogi 12y agoHere's the current status of .NET software development. I think there is a broad agreement that unit testing is a very useful tool in developing quality software. Because of the inherent limitation of C#, you can't unit test easily if you don't use DI. This often leads to a situation where you have tons of interfaces + each interface is implemented exactly by one class. This is because product like Isolator is not free. Hyptothetically, if Isolator was provided by Microsoft for free, I am sure that we will see reduced usage of DI. Don't get me wrong, I think there are other scenarios where DI is a great technique in designing components which are flexible. However, those scenarios are not that many. Using DI to make your software unit testable is an overkill IMHO.