A Lazy Sequence

Project templates

06 January 2013

When Anthony Grimes announced the deprecation of the Noir web frameworki for Clojure recently, one reoccurring response was that some people felt that having a single, popular web framework is valuable as it limits the decisions someone new to the language needs to make, therefore allowing them to get started quickly.

This is an instance of the XY Problem: the programmer wants to know what the path of least resistance is, but looks instead for a comprehensive framework that offers everything in oneii. Given this is going to happen regardless, I would like to talk about what we can do to address the Y by delivering the X.

Let’s look briefly at two features of Noir that I believe have contributed to its popularity in the Clojure web ecosystem.

First, documentation. Noir became popular partly because its website provided clear documentation on getting started that could be followed with limited understanding of Clojure and it’s ecosystem. Good documentation is vital. Noir delivers more than the bare minimum, and portions it out into manageable pieces. We cannot expect that everyone is familiar with Clojure style and idioms, or is comfortable (or even able) to spelunk library source code.

Second, Noir leverage Leiningen’s project template system to automate the basic structure of a web project project and in doing so removes much of the friction from getting started from scratch. There is a clear path forward here: switching from one super-dependancy to the component libraries and lein-ring as well as creating a simple hello world app would afford the exact same ease as Noir has provided but without the problems of using a framework.

These two factors are, I believe, a major contributor to Noir’s success, yet neither require a framework approach to web development. Going forward we can leverage this knowledge to provide straightforward getting-started experiences for new users of libraries.

Footnotes

  1. Noir lives on as a library, libnoir, it just no longer has the trappings of a framework. Porting a site from Noir to Compojure and libnoir is relatively little work.
  2. This is due, I believe, to the prevalence of full stack frameworks in many popular languages.