IoC

Can someone, in english, please attempt to explain to me the purpose and function of IoC(Inversion Of Control) and its practical uses.
The answer on stack overflow has an all right explanation http://stackoverflow.com/questions/3058/what-is-inversion-of-control
As best I can explain it, it's a way of designing a library so that components of the lib aren't locked in (coupled) to using specific other libraries. This allows the users of your library finer control over parts of your lib.
But why not code it that way in the first place?
James Parsons wrote:
But why not code it that way in the first place?

What? No-one said you had to write it the "normal" way and then change it later on (though you might have to do that if you don't think of it until later).
But why not code it that way in the first place?

...If you're implementing IoC then you would code it that way in the first place.
Topic archived. No new replies allowed.