1

If someone can explain the benefits of one over the other or the in what kind of scenarios one would be used over the other while designing applications, that would be informative.

Thanks!

Rookie
  • 5,179
  • 13
  • 41
  • 65
  • 1
    plz refer http://martinfowler.com/articles/injection.html or http://www.dotnet-tricks.com/Tutorial/dependencyinjection/bSVa100413-Understanding-Inversion-of-Control,-Dependency-Injection-and-Service-Locator.html – Razack Aug 12 '14 at 04:00
  • So is the service locator pattern a preferred one to better resolve compile time dependencies? Won't service locator pattern make the code less readable and a bit complex to unit test? Also, does the serviceLocator registry hold singleton objects of all service implementations? – Rookie Aug 12 '14 at 04:29
  • 1
    similar question to http://stackoverflow.com/questions/4985455/dependency-injection-vs-service-location – hatchet - done with SOverflow Aug 12 '14 at 04:49
  • What benefits do IOC implementations such as [Guice](https://github.com/google/guice) or [Grapht](https://github.com/grouplens/grapht) provide over standard DI or Service locator usages.. – Rookie Aug 12 '14 at 04:51

0 Answers0