Hexagonal Architecture Ports Often Leak HTTP Logic Into Business Layer
In hexagonal architecture, ports are designed to isolate core business logic from external systems and delivery mechanisms. However, developers frequently name and structure port methods after REST conventions, such as createUser or updateUser, rather than true business operations. This mismatch causes ports to reflect technical concerns instead of domain intent, making tests behave more like database checks than genuine business-logic validations. A discussion on the SQUER blog explores why this pattern persists and what it takes to write ports that accurately express business behaviour. A key debated point is whether a port interface remains worthwhile when only a single adapter will ever implement it.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in