aspose file tools*
The moose likes Spring and the fly likes Depengency injection and IOC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Depengency injection and IOC" Watch "Depengency injection and IOC" New topic
Author

Depengency injection and IOC

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1122
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

Joined: Sep 29, 2008
Posts: 12617

DI and IoC are essentially the same thing, IMO.
sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1122
what is mean by IMO?
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
IMO = In my opinion.

I think it's different, I'll reply later.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Mansi Mishra
Ranch Hand

Joined: Dec 26, 2008
Posts: 50
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

Joined: Jul 05, 2005
Posts: 1936
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

Joined: Jun 04, 2009
Posts: 155
As MF states, IoC is a more generic term than dependency injection. The latter is one of the ways to achieve the former.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Depengency injection and IOC