Adapter Layer

Learn more about the adapter layer, through the implementation of an example.

To finish off our work with the example of a restaurant, let us implement the adapter layer on top of the port layer.

Example definition

We will continue with the example that was defined in the Domain Layer lesson and finish the implementation. The last layer is the adapter layer. This layer is in charge of communication with the outside world, for example, communication with database connections, HTTP, and so on.

Model definition

The following diagram depicts the adapter layer, which defines six artifacts. Additionally, this layer makes use of the port layer. Due to its large size, this model is divided into two parts. Part one shows the domain, use case, and port layers, whereas part two shows the interaction between the port and abstract layers.

Get hands-on with 1400+ tech skills courses.