Timeline for IOC Containers break OOP Principles
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 19, 2017 at 15:49 | comment | added | Fred | @Den you technically don't "need" to use interfaces. Interfaces help with mocking for unit testing. You could also mark things you need to mock virtual. | |
Sep 23, 2014 at 10:06 | comment | added | Den | Actually, that the thing - I am using Dependency Inversion throughout from the very beginning. IoC affecting the design beyond that is my biggest worry. E.g. why would I use interfaces everywhere just to make IoC simpler? Also see the top comment on the question. | |
Sep 23, 2014 at 9:20 | comment | added | Euphoric | @Den Your project was not obviously designed with Dependency inversion in mind. And nowhere I said that using IoC is trivial. | |
Sep 23, 2014 at 8:45 | comment | added | Den | Tried applying IoC (Autofac) to a non-trivial project recently. Realized I had to do a similar job with non-language constructs (new() vs API): specifying what should be resolved to interfaces and what should be resolved to concrete classes, specifying what should be an instance and what should be a singleton, making sure property injection works right to alleviate a circular dependency. Decided to abandon. Works well with Controllers in ASP MVC though. | |
Sep 19, 2014 at 16:22 | history | answered | Euphoric | CC BY-SA 3.0 |