Ajit K

March 12, 2007

Dependency injection

Filed under: Links — AjitK @ 7:20 pm

Man! there’s so much to learn. I hadn’t heard of dependency injection till today!

http://en.wikipedia.org/wiki/Dependency_injection

Dependency injection (DI) is a programming design pattern and architectural model, sometimes also referred to as inversion of control or IOC, although technically speaking, dependency injection specifically refers to an implementation of a particular form of IOC.
The basic idea is that if an object depends upon having an instance of some other object then the needed object is “injected” into the dependent object. For example, being passed a database connection as an argument to the constructor instead of creating one internally.
The term “Dependency injection” is a misnomer, since it is not a dependency that is injected, rather it is a provider of some capability or resource that is injected.

Looking for an implementation to learn more about it? Have a look at the external links section in the wikipedia entry. Some are:
Guice Intro by Crazy Bob
Home of Guice

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment