IoC containers and service locator pattern

Posted by TheSilverBullet on Programmers See other posts from Programmers or by TheSilverBullet
Published on 2012-12-11T08:50:18Z Indexed on 2012/12/11 11:16 UTC
Read the original article Hit count: 200

I am trying to get an understanding of Inversion of Control and the dos and donts of this. Of all the articles I read, there is one by Mark Seemann (which is widely linked to in SO) which strongly asks folks not to use the service locator pattern.

Then somewhere along the way, I came across this article by Ken where he helps us build our own IoC.

I noticed that is is nothing but an implementation of service locator pattern.

Questions:

  1. Is my observation correct that this implementation is the service locator pattern?
  2. If the answer to 1. is yes, then Do all IoC containers (like Autofac) use the service locator pattern?
  3. If the answer to 1. is no, then why is this differen?
  4. Is there any other pattern (other than DI) for inversion of control?

© Programmers or respective owner

Related posts about design-patterns

Related posts about inversion-of-control