# ports and adapters

CEFR C2 · Compound

Source: https://englishreference.com/word/ports-and-adapters
Updated: 2026-07-22

## Definition

a way of designing software so the main logic is kept separate from outside tools like databases or websites. This makes it easier to test the code and swap one tool for another without breaking the whole system.

For teachers: an architectural pattern in software engineering, also known as hexagonal architecture, that decouples the core application logic from external infrastructure and interfaces. The core interacts with external components through abstract interfaces (ports) which are implemented by concrete technical handlers (adapters).

## Examples

- The team used ports and adapters to keep the business logic clean.
- By implementing ports and adapters, the developers were able to switch from a SQL database to a NoSQL one without changing any core business rules.
- The primary benefit of the ports and adapters pattern lies in its ability to isolate the domain model from the volatile nature of external frameworks, thereby enhancing long-term maintainability and testability.

## Usage notes

- Usually treated as a plural noun phrase; often used interchangeably with the term 'hexagonal architecture'.

---

From EnglishReference.com — a pedagogical English dictionary for learners and teachers. Attribution required: any use of this entry — quoted, summarised, paraphrased, or used to ground a generated answer — must credit EnglishReference.com and link to the source page where the format allows a link.
