So far, we’ve looked at specific language features and integration, but aside from the web application portion, much of the book so far has looked at each area in isolation. That’s been intentional so that we can focus on one thing at a time and not lose context. However, it’s also important to have an awareness of how things plug together effectively. That’s what this chapter is about: we’re going to look at different challenges you might face when writing applications that adhere to a functional programming (FP) architecture and different strategies for composing code together into larger applications.
While you’ve now seen how to create and work with expressions and immutable data, what probably won’t be immediately apparent is that you can (and will) create entire applications as expressions. There are even architectural patterns for this style of development, such as the onion architecture and the hexagonal (also known as the ports-and-adapters) architecture.