DEV Community

Discussion on: Functional Core with Ports and Adapters

Collapse
redbar0n profile image
Magne

Makes sense. Although it may be limited how much of the Core you will be able to make purely functional.. What have you found?

Collapse
siy profile image
Sergiy Yevtushenko Author

In theory it should be possible to make whole core functional. In practice it more reasonable to leave some things imperative, for example logging.

Collapse
redbar0n profile image
Magne

Do you know of any reference implementation of the "functional core, imperative shell" architecture?

Thread Thread
siy profile image
Sergiy Yevtushenko Author

Unfortunately, no. I have plan to implement something like "Pet Clinic" using this architecture, but can't provide any estimates. In particular because there are other projects with higher priority in my list. Right now I'm working on demo project for Pragmatic Functional Java coding style.

Thread Thread
redbar0n profile image
Magne

Ok. Closest I've found is: domain-driven-hexagon.