☕️ Hexagonal architecture on java applications
Hi 👋 today we are going to speak about hexagonal architectures.
Hexagonal architecture, also known as the "ports and adapters" architecture, is a software design pattern that focuses on the separation of business logic from the technical details of how that logic is implemented. In this architecture, the business logic of the application is contained in the "core" of the application, while the technical details, such as the user interface and the database access, are contained in "adapters" that surround the core.

One of the main benefits of using hexagonal architecture in a Java application is that it allows for greater flexibility and modularity. Because the business logic is isolated from the technical details, it is easier to make changes to the application without affecting the core functionality. This makes it possible to swap out one adapter for another without having to modify the core of the application.
For example, if you want to change the user interface of your application from a command-line interface to a graphical user interface, you can simply create a new adapter for the GUI and swap it in without having to touch the core of the application. This makes it easier to maintain and evolve your application over time.
Another benefit of hexagonal architecture is that it promotes the use of testing. Because the core of the application is isolated from the adapters, it is easier to test the business logic in isolation. This makes it possible to write unit tests for the core of the application, which can help to ensure that it is functioning correctly and can help to catch bugs early on in the development process.

Overall, hexagonal architecture is a powerful design pattern that can help to improve the flexibility, modularity, and testability of Java applications. If you are building a Java application and want to take advantage of these benefits, consider using hexagonal architecture to design your application.
Thanks for reading, enjoy hexagonal architectures!
(This brief was highly inspired by this article: https://itnext.io/hexagonal-architecture-principles-practical-example-in-java-364bb2e50075)