1
User
Recs.
Recs.
8
Updates
Last
Updated
Updated
Activity
5 Options
This pattern uses a central registry known as the "service locator", which on request returns the information necessary to perform a certain task.
Specs
Specs are quantitative aspects of the option such as the price
Pros
Cons
Con Very easy to use it incorrectly by coupling nearly all code with it
The wrong approach to Service Locator introduces an unnecessary dependency between the class and the container. It conceals what the dependencies really are as you have to check through the detail of the code to figure out what’s being resolved.
Know any negative aspects of this option?
Recommendations
Service Locator
Recommended 8 years ago
Bryan hasn’t added their experience, pros or cons to their recommendation.