Inversion Of Control vs Dependency Injection with selected quotes – is my understanding correct?

前端 未结 2 621
野的像风
野的像风 2020-12-25 08:21

I\'ve read a number of threads explaining the difference between IoC and DI and while many of explanations contradicted each other, I think

2条回答
  •  攒了一身酷
    2020-12-25 08:56

    I have written the differences at my [blog]:http://dotnet-stuff.com/tutorials/dependency-injection/dependency-inversion-principle-dependency-injection-and-inversion-of-control-dip-ioc-and-di "click here for updates" that how can we organize Inversion of Control, Dependency inversion Principle & Dependency Injection. In brief we can say that--

    At the top is Dependency inversion Principle which is a way of designing software. It doesn’t say how to make independent module. Inversion of Control(IoC) provides the way of applying DPI principle. But still IoC doesn’t provide us specific implementation. It gives some methods so that we can invert the control. If we want to invert control using Binding inversion or dependency creation then we can achieve it by implementing dependency injection (DI).

提交回复
热议问题