Building the Framework Hexagon
When building a hexagonal application, the last step consists of exposing the application features by connecting input adapters to input ports. Also, if there is any need to get data from, or persist it inside, external systems, then we need to connect output adapters to output ports. The Framework hexagon is the place where we assemble all the adapters required to make the hexagonal system.
We first created the domain model using things including entities, value objects, and specifications in the Domain hexagon. Then, in the Application hexagon, we expressed the user’s intent using use cases and ports. Now, in the Framework hexagon, we have to employ adapters to expose system features and define which technologies will be used to enable such features. After assembling the Domain, Application, and Framework hexagons, we will have an architecture resembling the following figure:
Figure 8.1 – Domain, Application...