Thursday, January 29, 2015

What is difference between Service Locator and Dependency Injection?

From Martin Fowler
http://martinfowler.com/articles/injection.html#ServiceLocatorVsDependencyInjection

From Stackoverflow
http://stackoverflow.com/questions/1557781/whats-the-difference-between-the-dependency-injection-and-service-locator-patte

Will try to write home-made  Service Locator first to see what happen.
If any problem, will try DI containers, such Autofac

No comments:

Post a Comment