-
-
Notifications
You must be signed in to change notification settings - Fork 539
Open
Description
The IClassProvider is an anti-pattern god class. It contains the class building for all components and extensions so on each enhancement on new extension you will need to update this interface and all implementing providers making maintaining it a nightmare and finding logic also complicated.
Would be better to use a decorator pattern like
interface ICssProvider<TComponent>()
{
IEnumerable<string> GetStyles();
IEnumerable<string> GetClasses();
}
Then you can implement where needed a CssProvider for specific frameworks and components. Also theming + defaults logic you could then move to these component providers making the components cleaner and easier to maintain.
I know this is a big refactoring maybe for a 3.0 release, but would certainly improve the API and maintainability on the long run.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels