I'm trying to make sense of Hexagonal architecture and want to know if I am understanding this correctly.
- You have a application layer where your business logic exists.
- You have a port layer which is just interfaces used by the application layer that your adapter layer must adhere to.
- You have an adapter layer which connects both incoming and outgoing communication to your application layer.
- On the driving side an adapter might be logic to wire up REST, gRPC, CLI, etc. to your application layer.
- On the driven side it would be to allow your application layer to communication with databases, other services, etc.
I have a few questions:
- Is this understanding correct?
- Where do input validation and authorization belong here? Is it in a driving adapter or the application layer?