Timeline for How is Inversion of Control related to Dependency Inversion
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 3, 2022 at 11:19 | comment | added | David Gomes | @AndreBorges That would be DI, but not IoC, since on IoC you'd have the framework inject it onto you, not you explicitly asking for it. | |
Feb 26, 2017 at 5:26 | comment | added | Saeb | @DavidArno, that sentence is not the whole picture. By introducing that abstraction, instead of the calling code needing a dependency on the server code, it takes a dependency on the abstraction. Then the server code implements and takes a dependency on that abstraction. Hence the direction of dependency is inverted. | |
Mar 3, 2016 at 18:58 | comment | added | David Arno | @holdenmcgrohen, it's his opinions on things. Just because it's Martin Fowler, doesn't make it fact. He's wrong at times IMO, eg regarding the "anaemia data model". Other times, his very insightful. On this occasion I think he's wrong too as it doesn't make sense. | |
Mar 3, 2016 at 18:53 | comment | added | holdenmcgrohen | @DavidArno, are you saying we can't trust Martin Fowler's website? | |
Mar 3, 2016 at 14:58 | comment | added | David Arno | "DIP, on the other hand, is about the level of the abstraction in the messages sent from your code to the thing it is calling." That sounds like nonsense to me. Where's the inversion in that? He's describing dependency abstraction, not inversion. | |
Mar 3, 2016 at 14:26 | comment | added | Sjoerd222888 | What you write is an implementation in the service locater pattern. This is also IoC. Not IoC is ISomeInterface object = new MyClass(). So the call that is meant is the "call to instantiation" (or who calls 'new'). | |
Mar 3, 2016 at 14:11 | comment | added | Andre Borges |
IoC is about who initiates the call - who intitates the call to what? If I write ISomeInterface object = container.Resolve<ISomeInterface>() is that IoC or not?
|
|
Mar 3, 2016 at 13:45 | history | answered | JDT | CC BY-SA 3.0 |