Top "Service-locator" questions

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.

Is IDependencyResolver an anti-pattern?

I am designing some architectural changes into a legacy ASP.NET application. I prototyped some classes for dependency resolution that …

c# asp.net-mvc dependency-injection service-locator
Is the Service Locator pattern any different from the Abstract Factory pattern?

At first glance, the Service Locator pattern looks the same as the Abstract Factory pattern to me. They both seem …

design-patterns service-locator abstract-factory
Spring ServiceLocator or pure factory pattern?

99% of my dependency is manage with DI pattern via @Autowired Spring annotation. Nevertheless in a particular scenario, I can't determine …

java spring dependency-injection service-locator
Why is MVC4 using the Service Locator Anti-Pattern?

After reading "Dependency Injection in .NET" by Mark Seemann I stay away from the Service Locator which is an anti-pattern. …

dependency-injection ioc-container asp.net-mvc-4 service-locator
How to avoid Service Locator Anti-Pattern?

I'm trying to remove a Service Locator from an abstract base class, but I'm not sure what to replace it …

c# dependency-injection inversion-of-control service-locator
Getting the service locator anywhere in ZF2

According to this article: http://www.maltblue.com/tutorial/zend-framework-2-servicemanager The ServiceManager is "in short a simple application registry …

zend-framework2 service-locator
Provider vs. Get_it

Searching for Dependency Injection solutions for Flutter, I found two awesome libraries: provider and get_it. As far as I …

flutter dependency-injection service-locator flutter-provider
Register abstract class and resolve derived class with Unity

I have the following code public abstract class A { public abstract string MethodA(); } public class B : A { public override string …

c# .net unity-container service-locator
ServiceLocator get instance by passing construction parameter

How can I get object instance with service locator with the constructor below. ProductCode is the constructor parameter used to …

c# asp.net unity-container service-locator