Besides DI, what benefits can I get from an IoC container?
IoC Frameworks just make DI much easier, but it's not only DI that they do, they provide a host of other benefits over and above DI.
I saw this comment in one开发者_如何学Python of the answers to a question about DI and IoC. Can someone explain this in some more details? What are other benefits of IoC?
Dependency injection is where a component (A) requires the basic functionality simliar to Component B, but does not directly state it. Inversion of control frameworks just highly depend on DI, rather than make assumptions of what is needed. Alternative components can be developed to replace the default implementation needed with dependency injection. Also another benefit of this is that the code is loosely couple, thus easier to reuse, reconfigure, and (typically) debug.
精彩评论