Chapter 6Creating Components

We’ve now laid a solid foundation—representing our domain, building aggregate data, transforming data with functions, creating state, and using concurrency. It’s time to start building larger units of code that correspond to the problem at hand. We’ll call these larger units components. Separating our code into components allows us to think at a higher level in pieces that correspond to our problem. Component boundaries are also a good way to divide a code base among multiple developers or teams. They can also be opportunities for reuse.

Components are collections of finer-grained elements (functions, records, protocols) that have a greater overall purpose. They have an external API that callers will use. They also ...

Get Clojure Applied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.