Skip to content

Commit 08bef33

Browse files
committed
Work on hexagonal architecture description
1 parent 63947a0 commit 08bef33

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

_posts/2016-04-16-hexagonal-architecture-in-practise.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ The layered architecture implements so called separation of concerns principle w
1111

1212
![Layers]({{ site.url }}{{ site.baseurl }}/assets/layers.png)
1313

14-
This way of building applications can be considered simple and effective. Moreover, we can see that the heart of the application is the centermost business logic layer. When implemented thoughtfully, the business logic layer can function without the real presentation layer or database.
14+
This way of building applications can be considered simple and effective. Moreover, we can see that the heart of the application is the centermost business logic layer. When implemented thoughtfully, the business logic layer can function without a real presentation layer or database.
15+
16+
Hexagonal architecture builds upon this concept. The heart of the application is the business logic. It answers the question what does this application do? But the business logic alone may not be very useful. Something has to drive this application, call the business logic methods. These drivers we call the primary ports. Also, the business logic has its dependencies. For example, there may be a data storage module that business logic calls upon to retrieve and update data. These dependencies are called the secondary ports of the application.
17+
18+
The ports may have one or more implementations. For example there may be a mock database for testing and a real database for running the application. The port implementations are called adapters. Thus the alias name Ports and Adapters for Hexagonal Architecture. Other names describing the same concept are Clean Architecture and Onion Architecture.
19+
20+
The name for the pattern comes from the following hexagonal drawing.
21+
22+
![Hexagon]({{ site.url }}{{ site.baseurl }}/assets/hexagon.png)
23+
1524

1625
hexagonal architecture
1726
- originated from layered architecture

assets/hexagon.png

23.4 KB
Loading

0 commit comments

Comments
 (0)