Using Selmer

In Chapter 2, Clojure Web Stack, I mentioned that there’s a number of templating languages available for Clojure. In this section we’ll look at the Selmer engine and see what’s involved in converting our picture gallery to use it instead of Hiccup.[55]

The reason for picking Selmer over some of the more popular alternatives, such as Enlive, is its ease of use and familiarity. Enlive has a steep learning curve and can be difficult to master.

On the other hand, Selmer is based on the Django templating engine.[56] If you’re already familiar with Django or similar templating languages, you should feel right at home. Another advantage to using Selmer is that it’s fast.

What’s Different about Selmer?

Hiccup is a nice and simple ...

Get Web Development with Clojure 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.