Hexagonal architecture keeps domain logic independent of HTTP or a particular database. The domain defines ports that input and output adapters implement.
The demo swaps SQL and in-memory storage while order rules stay unchanged. For simple CRUD, extra abstractions may add more complexity than value.
When to use
Use it when business rules need testing apart from external systems or replaceable storage.