Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Avoid layer packages #60

Open
odrotbohm opened this issue May 25, 2020 · 0 comments
Open

Avoid layer packages #60

odrotbohm opened this issue May 25, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request in review Moderators are investigating how to best proceed with the issue

Comments

@odrotbohm
Copy link

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.

@odrotbohm odrotbohm added the enhancement New feature or request label May 25, 2020
@jensmuehlner jensmuehlner added the in review Moderators are investigating how to best proceed with the issue label May 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request in review Moderators are investigating how to best proceed with the issue
Projects
None yet
Development

No branches or pull requests

3 participants