Functional Core with Ports and Adapters

Sergiy Yevtushenko - Mar 29 '20 - - Dev Community

While working on my architecture research, I've found that two architecture approaches, namely "Ports and Adapters (Hexagonal architecture)" and "Functional core - Imperative shell", are suspiciously similar.

Ports and Adapters architecture:
Ports And Adapters

Functional core - imperative shell:
Alt Text

Let's make slight changes into each architecture:

  • Make inner core of the Ports and Adapters functional
  • Make imperative shell consisting of Adapters

With these changes whole picture will look like this:
Alt Text

From my point of view such a combination makes great sense - advantages of both approaches are get combined. In the same time each approach adds more clarity to the combined picture: Ports and Adapters do nod clarify how core is implemented, while Functional Core - Imperative Shell does not clarify how shell should look like.

So, what do you think about this "hybrid" of two architecture patterns?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player