webery icon indicating copy to clipboard operation
webery copied to clipboard

Dependency Injection containers do not have static public accessors to self.

Open paul-hammant opened this issue 6 years ago • 0 comments

public static DependencyFactory get() {
        return DependencyFactoryHolder.instance;
}

Code like this (multiple containers over the last 14 years) is actually ServiceLocator which Di and IoC were trying to eradicate.

paul-hammant avatar Jun 07 '18 07:06 paul-hammant