Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Depengency injection and IOC

 
sam liya
Ranch Hand
Posts: 1240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is Depengency injection and IOC same or not?

i find one article saying that Depengency iinjection is A kind of Inversion of Control.
that means all Inversion of Control are not Depengency iinjection?i Is it true?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DI and IoC are essentially the same thing, IMO.
 
sam liya
Ranch Hand
Posts: 1240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is mean by IMO?
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO = In my opinion.

I think it's different, I'll reply later.
 
Mansi Mishra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aruna sameera wrote:is Depengency injection and IOC same or not?

i find one article saying that Depengency iinjection is A kind of Inversion of Control.
that means all Inversion of Control are not Depengency iinjection?i Is it true?



IOC and dependency injection are essentially the same thing, just two different names.
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Martin Fowler, IoC is a too generic term. You can read his thought more on http://martinfowler.com/articles/injection.html#InversionOfControl.
 
Eduardo Bueno
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As MF states, IoC is a more generic term than dependency injection. The latter is one of the ways to achieve the former.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic