Hexagonal Architecture
A software architecture pattern proposed by Alistair Cockburn in 2005, also known as the Ports and Adapters architecture. Its central idea is to place business logic at the core and interact with the outside world through abstract ports, with adapters responsible for translating external technologies so that the business core remains independent of specific implementations.
Timeline (last 90 days)
The experiment built two versions of the same Java sample application: one using hexagonal architecture (with ports, adapters, and architecture tests), and the other a flat version with no architectural constraints, both of which needed to pass the same set of external test cases.
In every round of this experiment, the flat version without architectural constraints consistently took less time overall.
The hexagonal architecture version consumed more input and output tokens overall.
In the scenario of adding PostgreSQL support while retaining SQLite, the hexagonal version completed in approximately 39 minutes with no changes to the core application code, while the flat version took 71 minutes.
The time saved by the hexagonal architecture in the database extension scenario was not enough to offset the cumulative time gap accumulated across the preceding fifteen-feature sequence.
Hexagonal Architecture, also known as the Ports and Adapters pattern, has a core philosophy of isolating different concerns through clear boundaries and interfaces, allowing each layer to evolve and be replaced independently.
All Facts (6)
The experiment built two versions of the same Java sample application: one using hexagonal architecture (with ports, adapters, and architecture tests), and the other a flat version with no architectural constraints, both of which needed to pass the same set of external test cases.
50%UnverifiedIn every round of this experiment, the flat version without architectural constraints consistently took less time overall.
50%UnverifiedThe hexagonal architecture version consumed more input and output tokens overall.
50%UnverifiedIn the scenario of adding PostgreSQL support while retaining SQLite, the hexagonal version completed in approximately 39 minutes with no changes to the core application code, while the flat version took 71 minutes.
50%UnverifiedThe time saved by the hexagonal architecture in the database extension scenario was not enough to offset the cumulative time gap accumulated across the preceding fifteen-feature sequence.
50%UnverifiedHexagonal Architecture, also known as the Ports and Adapters pattern, has a core philosophy of isolating different concerns through clear boundaries and interfaces, allowing each layer to evolve and be replaced independently.
50%