Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 5
    Service Locator is not an antipattern - Fowler himself references it in the URL you posted. While the Service Locator pattern can be abused (in the same way that Singletons are abused - to abstract away global state), it is a very useful pattern. Commented Mar 11, 2013 at 13:37
  • 1
    Interesting to know. I've always heard it referred to as an anti pattern. Commented Mar 11, 2013 at 13:45
  • 4
    It's only an antipattern if the service locator is used to store global state. The service locator should be a stateless object after instantiation, and preferably immutable. Commented Mar 11, 2013 at 13:57
  • XML is not type safe. I would consider it a plan z after every other approach has failed Commented Oct 18, 2015 at 16:41