Everyone is chiming in on Cedric’s post claiming that he doesn’t get IoC.
I sometimes feel that the IoC crowd expects to explain IoC and have people say *a ha!*, and suddenly stand back with halo’s as they see the amazing benefits.
In reality, I always find IoC to be one of those ideas which
The only way to get it in my opinion is to live it.
There are a lot of technologies like this. You can’t really understand what it does to YOU the programmer, until you do some work with it. E.g., using a real ORM, playing with Ruby/Lisp/Haskell, etc etc.
IoC, to me, gives me a way to help me write clean code. Nice units to test easily, forcing me to design to interfaces (which I tried to do before hand anyway, and which Cedric does (which is another reason why it doesn’t seem like a big deal sometimes).
I never want to see a
lookup("foo"). As soon as I do I get the jibblies. What if foo isn’t there? What exceptions do I need to handle with foo?
So, for me, IoC is both a big deal, and a small deal. I don’t really think about it anymore. It is just part of the system, part of the pattern of writing code. It is used to help test, be agile, and all the cliches.
But, you won’t ‘get it’ until you just do some serious work using it… and then you won’t even think “oh I get it”, you will just be doing it.