Tuesday, September 13, 2005

Spring's IoC

well, after looking at many frameworks outta there, I decide that it is now my time to see what Spring is actually (though I never need it in my current job, at least I might learn some new ideas/pattern which maybe I could use in my code ;).

Here is the point that has interest me during my Spring's introduction reading :

Inversion of Control / Dependency Injection

Why does it interest me? ... maybe because I'm somehow a design pattern freak :)

ok, let's continue...
In order to find out more about IoC, I read these links below :
Now, I know that Dependency Injection is an Inversion of Control, but not vice versa (at first I think that both terms refer to the same things) and I just realized that I've met with IoC since the first time I write codes in GUI environment(event based) after many years playing (read : coding) in DOS environment.

btw, maybe it's surprising to see a developer using Spring which didn't understand IoC/DI clearly. They're just another "copy-paste" & "trial and error" developer, which sadly I believe quite many.
I'm a believer in "you must understand what you're doing".


hmm... that's all for now, still a long introduction to read :)


peace

6 comments:

Matt Wilber said...

I am probably in the same camp that you started, but I was intrigued by your statement: "Now, I know that Dependency Injection is an Inversion of Control, but not vice versa (at first I think that both terms refer to the same things)" Can you explain the difference, because I have always considered them the same and never thought about a difference? Thanks.

Santoso said...

imho, IoC is quite a generic term, and DI itself is more a specific term.

Here is some explanation.
In moving to the GUI environment (event based) from a non GUI environment, there is an inversion of control.
In the non GUI environment (e.g. DOS env), the control of the program is fully on us, in the GUI environment, the control is inverted to the OS, all we do is just wait for the event.
Obviously I can't say that the above example is a Dependency Injection.

Hope that this simple explanation may help you.

Anonymous said...

Nice site!
[url=http://pvphzxgq.com/mqyv/inzr.html]My homepage[/url] | [url=http://snfmjaxz.com/utdx/fthj.html]Cool site[/url]

Anonymous said...

Nice site!
My homepage | Please visit

Anonymous said...

Well done!
http://pvphzxgq.com/mqyv/inzr.html | http://efxpwrbn.com/wtds/igyp.html

Anonymous said...

Check this also
http://www.oyejava.com/tiki-index.php?page=Spring+Introduction