This repository has been archived by the owner on May 16, 2023. It is now read-only.
Avoid layer packages #60
Labels
enhancement
New feature or request
in review
Moderators are investigating how to best proceed with the issue
Current Implementation
Currently the application uses layer packages to organize code. E.g. repositories are separated from services and other domain types. This reduces the ability to properly encapsulate Spring components as e.g. the repositories have to be made public so that the services can refer to them. That in turn causes all code in the application to be able to refer to and use the repositories, even if that's not desirable.
Suggested Enhancement
I suggest to fold all domain packages (domain, model, repository, services) into a single package, and only make types public that need to be referred to by the primary exporting port (the Spring MVC controller)
Expected Benefits
Improved encapsulation as implementation details like the repositories are not accessible from the web layer anymore.
Feel free to ping me if you think you'd like to see a draft PR for this.
The text was updated successfully, but these errors were encountered: