You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently in the process of implementing a simple hexagonal architecture. I have followed the DDD principle and placed the DomainModels alongside the DomainServices in a domain-package. In addition to this, there is the adapter-package, which contains inbound and outbound adapters.
Now, the ports also need to be placed somewhere. Initially, I put them in a third package called application and added this path to the ApplicationService method from ArchUnit. However, this is a problem for ArchUnit because there are now accesses from the domain-package to the application package:
Class <...domain.services...> implements interface <...application.ports.in...> in (...)
Therefore, I have now tried placing the ports in the domain-package, which achieves the desired effect. However, I am now wondering what the application package or the applicationService method is needed for? What should go in there? Or am I misunderstanding something here?
Here is a brief overview of my (final) structure again:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently in the process of implementing a simple hexagonal architecture. I have followed the DDD principle and placed the DomainModels alongside the DomainServices in a domain-package. In addition to this, there is the adapter-package, which contains inbound and outbound adapters.
Now, the ports also need to be placed somewhere. Initially, I put them in a third package called application and added this path to the ApplicationService method from ArchUnit. However, this is a problem for ArchUnit because there are now accesses from the domain-package to the application package:
Class <...domain.services...> implements interface <...application.ports.in...> in (...)
Therefore, I have now tried placing the ports in the domain-package, which achieves the desired effect. However, I am now wondering what the application package or the applicationService method is needed for? What should go in there? Or am I misunderstanding something here?
Here is a brief overview of my (final) structure again:
And here is my current test:
Beta Was this translation helpful? Give feedback.
All reactions