Is ServiceLocator an anti-pattern?
If you define patterns as anti-patterns just because there are some situations where it does not fit, then YES it’s an anti pattern. But with that reasoning all patterns would also be anti patterns. Instead we have to look if there are valid usages of the patterns, and for Service Locator there are several use … Read more