O'Reilly logo

Clojure Applied by Alex Miller, Ben Vandgrift

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Taking Things Apart

Our first task is figuring out how to go from our problem to a rough architecture for solving that problem. We analyze the problem to identify distinct components, which we discussed in Chapter 6, Creating Components. We separate our code into components for several reasons: reuse of generic components within an application (or across many applications), dividing development within a team, or even a structure that allows us to think about only part of the problem at a time.

Although there are no rules on how to separate components, you can follow some common guidelines. Some reasons to group code together include: the functions work on the same kind of data, the data has a common scope or lifetime, the likelihood of change ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required