An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

FW/1 0.2.1 (for Clojure) released

August 19, 2013 ·

Framework One for Clojure version 0.2.1 is available. The easiest way to get started is via Leiningen and the fw1 template:

lein new fw1 myapp

This creates a minimal web application in the myapp folder that can be started like this:

PORT=8123 lein run

Now you have FW/1 running on port 8123 (via Jetty).

What's new in 0.2.1? The big new feature is Django-style HTML templating (via the excellent Selmer templating library). You can see an example view template here: usermanager example list view. You can see an example controller here: usermanager example controller (only lines 1-36 are relevant - the rest is to support the alternative Enlive-based template version provided in the same examples folder.

Tags: clojure · fw1

4 responses

  • 1 matt // Aug 20, 2013 at 12:51 AM

    Hi Sean,
    Does this templating library have any benefits over cfml in views?
    besides it supports your clojure framework etc
  • 2 Nando // Aug 20, 2013 at 1:38 AM

    Very interesting Sean. Thank you. Clojure seems even more attractive to me.

    From the explanation alone, I see :

    PORT=8123 lein run
    Now you have FW/1 running on port 8111

    Regarding the port number, is that a typo?
  • 3 Sean Corfield // Aug 21, 2013 at 8:01 PM

    It helps keep logic out of your views :)

    The main reason I'm switching the Clojure version of FW/1 to Selmer from Enlive is that Selmer is much easier to work with and the Django-style templating approach is pretty well-known and well-documented.

    It's not that it supports my framework - my framework now supports both Enlive and Selmer so FW/1 for Clojure users have a choice (and I'd expect most of them to choose Selmer).
  • 4 Sean Corfield // Aug 21, 2013 at 8:02 PM

    @Nando, oops - typo fixed! Glad that FW/1 might encourage you to try Clojure!