Possible Duplicate:
What is Inversion of Control?
I understand what Dependency Injection (DI) is (I think!). It's basically the satisfying of dependencies that an object may have. I try to think of the code I write when using DI as service oriented and I define my code as using other services.
However, I'm currently wondering what it is exactly that we're inverting the control of, when using IoC. It's a fairly vague term and it could mean a couple of things.
But, I think it's the responsibility of creating the object (and therefore satisfying dependencies using DI) which is handled by the IoC framework.
It is still the responsibility of the application to ask for objects (ie - services) that it uses, the distinction being that it doesn't know (or care) how to create it. So, why is service locator considered an anti-pattern if all it's doing is asking for a service?
Have I got that correct? Or does it mean something else. Also, have I got the responsibilities of DI and IoC separated correctly? If I have then an IoC framework cannot function without a DI framework. Or is DI just a feature of IoC frameworks?