Service locator pattern

The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer. This pattern uses a central registry known as the "service locator", which on request returns the information necessary to perform a certain task.[1] Note that many consider service locator to actually be an anti-pattern.[2]

Advantages

Disadvantages

See also

References

  1. http://martinfowler.com/articles/injection.html#UsingAServiceLocator
  2. Seemann, Mark. "Service Locator is an Anti-Pattern". blog.ploeh.dk. Retrieved 2017-06-01.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.