Service Locator Pattern
Kind: pattern
Layer: Extensibility Core
Record: architecture:service-locator-pattern
Severity: discouraged
Scope: runtime, dependency access
Canonical: Ontology
A design pattern in which code fetches its dependencies from a global registry at the point of use.
Listed in Architecture principles, after Registry Pattern and before Feature Toggle.
Requires
Reinforces
Enables
In tension with
Tensions
- Service Locator Pattern / Testability
- Service Locator Pattern / Dependency Inversion Principle (DIP)
- Service Locator Pattern / Explicit Dependencies