17

Possible Duplicate:
Why do I need an IoC container as opposed to straightforward DI code?

I have been reading about dependency injection and the best explanation was from James Shore. "Dependency Injection" is a 25-dollar term for a 5-cent concept... Dependency injection means giving an object its instance variables."

If it is such a simple concept what is the point of dependency injection frameworks? When should I use one?

Community
  • 1
  • 1
Hna
  • 1,006
  • 9
  • 16

1 Answers1

-1

There's lots of material readily available to answer your question as to the benefits, e.g:

http://tutorials.jenkov.com/dependency-injection/dependency-injection-benefits.html

As for when to use it... well that depends on whether you agree with the benefits (as presented above). It also depends on whether the dependency injection framework fits with your current set of technologies (if any).

Jonathan Holloway
  • 62,090
  • 32
  • 125
  • 150