title: verifiying I understand the difference between IoC, Ioc Container, DI and service locator
body: <p>read many posts about the difference between the 3 idioms. But got more confused, then I ran into this article:
  <a href="http://martinfowler.com/articles/injection.html" rel="nofollow">http://martinfowler.com/articles/injection.html</a></p>
  
  <p>just want to see if I got this right. please correct me if I'm wrong.
  Please notify me of correction and additions:</p>
  
  <p>IoC- is the <strong>concept</strong> of decoupling an application from the implementation of a service it uses. The application contain a ref to Iservice and is not incharge of instanciating the concrete service.</p>
  
  <p>There are at least two way to achive so:</p>
  
  <ol>
  <li><p><strong>DI</strong> - The concrete service is injected as a ctor param/throw a setter/throw interface injection (<strong>what does the latter mean?</strong>)</p></li>
  <li><p><strong>ServiceLocator</strong> - is a component that knows all the concrete services the application may need. The application explicitly asks for the concrete service from the Locator.</p></li>
  </ol>
  
  <p>*IoC container is actualy a controls' factory ("provider").</p>
  
  <p>I got a bit confused by the "when to prefer (1) or (2)" part in the article. <strong>could someone please tell from his own experience in a layman words ?</strong></p>
  
  <p>"Service Locator has a slight edge due to its more straightforward behavior. However if you are building classes to be used in multiple applications then Dependency Injection is a better choice."--> How is locator more straightforward ? because it uses method invocation explicitly ? What is it better to use DI when there are multiple applications?</p>