Dependency Injection and Inversion of Control

I'm reading a book Microsoft .NET: Architecting Applications for the Enterprise. In chapter 3 (Design Principles and Patterns), the book states:

Inversion of control (IOC) is an application of DIP that refers to situations where generic code controls the execution of more specific and external components.

I disagree. I think DIP is an application of IOC. In Martin Fowler's article Inversion of Control Containers and the Dependency Injection pattern he states:

As a result I think we need a more specific name for this pattern. Inversion of Control is too generic a term, and thus people find it confusing. As a result with a lot of discussion with various IoC advocates we settled on the name Dependency Injection.

To me that indicates that DIP is a specific term for a specific application of IOC.

What say you?

链接地址: http://www.djcxy.com/p/30216.html

上一篇: 实现控制反转的方法

下一篇: 控制的依赖注入和反转