Hexagonal architecture: the orders module
Keep the business rules in a core that declares ports, and plug HTTP, storage and providers in as adapters.
Level Intermediate
What you will see
- Rules that only HTTP can reach
- A domain that knows nothing of HTTP
- Ports: what the core offers and what it needs
- Adapters translate at the edge
- One place to plug everything in
- When the hexagon is too much
Before / after
Base: naive-crud-goView the diff