is this accurate: Dependency Injection & Service Locator are the two types of Inversion of Control?
...or this: IoC = Dependency Injection?
Either way, Service Locator seems inferior to Dependency Injection. It is going to be slower as it requires one to crawl the Application Context and it does not allow one to pass in mock dependencies in testing.
No comments:
Post a Comment