Description of problem
The ComponentFactory was originally implemented prior to Dependency Injection in the Dnn Platform. It uses a very similar technique of registering types for static instantiation. It should be migrated to Dependency Injection
Description of solution
The solution I have in mind has 3 main components to it
- Update the
ComponentFactory implementation to use the Dependency Injection container to resolve all the types.
- Change all
ComponentFactory usages at app startup to use Dependency Injection instead.
- Mark the
ComponentFactory as deprecated to ensure modules and vendors use Dependency Injection instead.
Description of alternatives considered
Should DNN keep the API available for ComponentFactory?
Since Dnn has taken a strong opinion on Dependency Injection, I think it should deprecate the ComponentFactory otherwise it just means there is another API that needs to be maintained that does the same thing as Dependency Injection.
Screenshots
N/A
Additional context
The testing effort for this will be high
Affected browser
N/A
Description of problem
The
ComponentFactorywas originally implemented prior to Dependency Injection in the Dnn Platform. It uses a very similar technique of registering types for static instantiation. It should be migrated to Dependency InjectionDescription of solution
The solution I have in mind has 3 main components to it
ComponentFactoryimplementation to use the Dependency Injection container to resolve all the types.ComponentFactoryusages at app startup to use Dependency Injection instead.ComponentFactoryas deprecated to ensure modules and vendors use Dependency Injection instead.Description of alternatives considered
Should DNN keep the API available for
ComponentFactory?Since Dnn has taken a strong opinion on Dependency Injection, I think it should deprecate the
ComponentFactoryotherwise it just means there is another API that needs to be maintained that does the same thing as Dependency Injection.Screenshots
N/A
Additional context
The testing effort for this will be high
Affected browser
N/A