|
|
|
|
|
by jcyw
2827 days ago
|
|
The idea of functional core is cool. I find domain-driven design a better guide for implementation. In a nut shell, there are three types of objects: value, entity, and service. Both value and entity are functional and stateless objects. A service object maps between stateless objects and may cross the domain boundary (such as network, IO, etc). When I do this in java, a service object would have interfaces returning CompletableFuture of Value or Entity objects. InfoQ has a very nice summary of DDD book:
https://www.infoq.com/minibooks/download/domain-driven-desig... |
|