Ports & Adapters Architecture Flashcards

1
Q

What is the goal of this architecture?

A

Allow an application to equally be driven by users, programs, automated test or batch scripts, and to be developed and tested in isolation from its eventual run-time devices and databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main idea of the Hexagonal Architecture?

A

The idea is to think about our application as the central artefact of a system, where all input and output reaches/leaves the application through a port that isolates the application from external tools, technologies and delivery mechanisms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Port?

A

A port is a consumer agnostic entry and exit point to/from the application. In many languages, it will be an interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Adapter?

A

An adapter is a class that transforms (adapts) an interface into another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the benefits of this approach?

A

Using this port/adapter design, with our application in the centre of the system, allows us to keep the application isolated from the implementation details like ephemeral technologies, tools and delivery mechanisms, making it easier and faster to test and to create a reusable proof of concept.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly