DEV Community

jocimar-dev
jocimar-dev

Posted on • Updated on

It's easier to understand technology concepts with playful comparisons.

Image description

I managed to better understand the technology concepts when I started to abstract and make comparisons with subjects that I have clear in my mind and the solutions that I need to implement.

For example, to understand hexagonal architecture I did the following exercise:

Let's imagine that we are building a secret club, right in the style of comic book stories. The structure of Hexagonal Architecture could be seen like this:

Club Core (Domain/Business Logic): This is where the magic happens. This is the headquarters of our superhero league, where all major decisions and strategies are made.

Club Manager (Application): This is the guy who coordinates everything. He doesn't decide the strategies, but he makes things happen. He's kind of like Alfred to Batman - he's not there to fight the villains, but without him, Batman would be lost.

Club Headquarters (Infrastructure): This is the Batcave, the Stark Industries building, the place that keeps everything running. Here you find the tools, the computers, the vehicles... everything our heroes need to get the job done.

Now, the coolest thing about this Hexagonal Architecture are the "ports" and "adapters". Let's call them "secret doors" and passports.

The Secret Doors (Ports) are like the secret entrances and exits we have in the club. They are invisible to the outside world and can only be accessed using the correct passports.

The Passports (Adapters) are like special keys that allow our superheroes (and only them!) to use the secret doors. They are the guarantee that our superhero league will not be discovered by the outside world.

So, this is how Hexagonal Architecture works - a secret superhero club that keeps evil away! (I know it's silly but didactic).

I hope this explanation has made Hexagonal Architecture a little cooler for you!

Jocimar Neres on LinkedIn: #architecture #hexagon #java #kotlin

É mais fácil entender conceitos de tecnologia com comparativos lúdicos. Eu consegui entender melhor os conceitos de tecnologia quando passei a abstrair e…

favicon linkedin.com

Top comments (0)