-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Current Problem:
The IContentDefinitionService interface is currently part of the Module project. This setup is suboptimal because any other project that wants to use this service (e.g., to manage content definitions such as deleting a content type) would be forced to reference the Module project directly. This introduces unnecessary coupling and goes against clean architecture principles.
Proposed Solution:
- Move the
IContentDefinitionServiceinterface to the ContentType.Abstractions project to decouple it from implementation details and module-specific logic. - Refactor the service so that it returns domain models instead of ViewModels, as returning ViewModels from a service layer breaks separation of concerns and leads to poor design.
- Update all affected code to reflect the refactoring and maintain consistency.
Benefits:
- Promotes better separation of concerns and a cleaner architecture.
- Avoids unnecessary dependencies on the Module project.
- Improves reusability and makes the service accessible to other projects without introducing tight coupling.
@hishamco are you interested in making this PR? If not, I’ll do it when time permits. But it needs to be done for v3 since it will have breaking change.