Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Advantages  





2 Disadvantages  





3 See also  





4 References  





5 External links  














Service locator pattern






العربية
Deutsch
Magyar
Русский
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 



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] Proponents of the pattern say the approach simplifies component-based applications where all dependencies are cleanly listed at the beginning of the whole application design, consequently making traditional dependency injection a more complex way of connecting objects. Critics of the pattern argue that it is an anti-pattern which obscures dependencies and makes software harder to test.[2][better source needed]

Advantages[edit]

Disadvantages[edit]

See also[edit]

References[edit]

  1. ^ Fowler, Martin. "Inversion of Control Containers and the Dependency Injection pattern".
  • ^ Seemann, Mark. "Service Locator is an Anti-Pattern". blog.ploeh.dk. Retrieved 2017-06-01.
  • External links[edit]


  • t
  • e

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Service_locator_pattern&oldid=1195923299"

    Categories: 
    Architectural pattern (computer science)
    Software design patterns
    Software engineering stubs
    Hidden categories: 
    Articles needing additional references from May 2020
    All articles needing additional references
    Articles that may contain original research from May 2020
    All articles that may contain original research
    Articles with multiple maintenance issues
    Articles with short description
    Short description is different from Wikidata
    All articles lacking reliable references
    Articles lacking reliable references from May 2020
    All stub articles
     



    This page was last edited on 15 January 2024, at 20:37 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki