You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daniel Gonzalez Garcia edited this page Mar 9, 2018
·
2 revisions
Service Locator
A service locator knows now to find (and create) every dependency needed in the system.
This knowledge is provided by someone else at another moment of the application lifecycle.
Contextual information can be passed onto the SL for it to provide the correct implementation of a given service. Factories can still be used for more complex and specific context passing.
Individual classes are still responsible of asking the locator what they need. Scalability anyone?
Hard dependencies are taken on the SL by every class that uses it.