1

Possible Duplicate:
Inversion of Control < Dependency Injection

I know what dependency injection is but trying to understand why its also know as Inversion of Control.

0

2 Answers 2

4

Inversion of control is a principle and dependency injection is a technique. The distinction is subtle and most people refer to them interchangeably.

Sign up to request clarification or add additional context in comments.

Comments

1

Basically it means that not the components itself are in control for looking up and instantiating their dependencies anymore.

The term Dependency Injection came up in Martin Fowlers great article on Inversion Of Control Containers and the Dependency Injection Pattern:

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.