Caveat: This post needs some rudimentary knowledge of Compojure. Compojure is a web framework for Clojure, and if you don’t understand what that means, then you should probably head over to the Compojure docs. Compojure exposes us to a beautifully composable abstraction, and this post is an attempt to show why that is a great thing.
In order to understand the Compojure framework, let us write a small cello world app. The code snippets in this post are a means to explain a concept, they may not work as-is. The full, working code is available at this gist. Okay then, let’s get started.