Chapter 2 Luminus Web Stack

Web Development with Clojure, Third Edition — by Dmitri Sotnikov, Scot Brown (14 / 107)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 What You ’ve Learned | TOC | Route Requests with Ring 👉

Now that we’ve gone through the process of building a web application using Clojure, let’s take a look at what the Luminus template set up for us.

Many popular platforms, such as Rails or Django, take the approach of providing a monolithic framework for building web applications. The Clojure community has avoided this approach, using modular components instead. This means that you can structure your projects according to each one’s needs.

Of course, to do that you have to know what libraries exist, what they are for, and how to put them together effectively. Even if you know the libraries that you wish to use, every project needs a certain amount of boilerplate.

The Clojure community tackles this problem by using project templates. These generate the necessary boilerplate for specific types of projects in a way that is readable and explicit, so you can get started quickly and change any of the generated code if necessary. In this book we’re primarily using the Luminus template. The web application generated by Luminus is ready for deployment out of the box. The only missing part is your domain logic.

Two libraries are at the core of the application we developed in the previous chapter. Ring provides a basic API for handling HTTP…

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.