Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do ports really belong to infrastructure or just their adapters? #23

Open
leonardbinet opened this issue Mar 14, 2023 · 0 comments
Open

Comments

@leonardbinet
Copy link

First, 馃憦 @VincentJouanne this clean architecture template is awesome (and I've checked a few).

Small suggestion, in your example, ports belong to the infrastructure directory:
Screenshot 2023-03-14 at 21 45 22

Whereas I think those interfaces should belong to the domain.

Quoted from this article: https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/

It鈥檚 important to note that the Ports (Interfaces) belong inside the business logic, while the adapters belong outside. For this pattern to work as it should, it is of utmost importance that the Ports are created to fit the Application Core needs and not simply mimic the tools APIs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant