Hexagonal architecture is made by core and actors.
Core is the business logic needed to solve the problem. It’s orthogonal to the infrastructure. Orthogonal means the core is decoupled from the infra. Even better definition is: the core is technology agnostic.
The core defines how to achieve the business logic goals.
So, what’s the core? it’s the business logic uncorrelated to the infrastructure.
And now, what are the actors? Are those that trigger the core (driver actors) or those that has been triggered by the core (driven actors).
Example of actors?
Actors in programming can be abstracted as:
ports -> interfaces which defines how the communication between actors and core happens
driver ports -> a set of actions the core provides to the outside (driver actor triggers the core)
driven ports -> a set of actions that actor has to implement (driven actor triggered by the core)
adapters -> are simply the implementations of the interfaces’ ports which are responsible to transform and adapt the request in order core can interact.
Example of adapters:
Driver adapters are handlers.
Driven adapters are repositories.
Focus and energy on implementation of business logic. Define use cases and work on it. Forget everything.
What’s functional requirements? Use cases.