3 ms·
This has not been my experience with dependency injection frameworks in C# at all. You know what happens in a large code base when you tell all of the developer
by camdenreslink 4y ago
This has not been my experience with dependency injection frameworks in C# at all. You know what happens in a large code base when you tell all of the developers to do manual dependency injection? They don’t do it and instantiate their dependencies in the constructor because it’s easier.
- drunkenmagician 4y agoSo deterministic instantiation then, which I as a (predominately C#, currently) developer actually prefer - I find it much easier to follow unfamiliar code. But whatever work for your team ...
- cgdub 4y agoI work in a large code base where we've told all of the developers to use dependency injection frameworks. We are now using a mixture of 3 different dependency injection frameworks, manual dependency injection, and instantiating dependencies in the constructor.
- za3faran 4y agoHow is that a problem with DI, instead of a problem with the engineering team not enforcing coding guidelines and libraries?
- mrkeen 4y agoI'd prefer what you describe, because I would still be allowed to fix it (change it to manual DI). I usually write manual DI when I want to iterate on the system and make sure each part does what it's supposed to. Then once it works I convert it to Joe Armstrong's gorilla-holding-the-banana-and-the-whole-jungle (framework DI) so it gets past code review, and I hope to never touch it again.