Howard M. Lewis Ship edited this page Dec 5, 2011 · 22 revisions

This is a stupid time to be doing this.

Tapestry 5.3 is has just gone final release, Tapestry 5.4 will follow. How many web frameworks can one person write?

That doesn’t change my need to learn new things. Clojure. Monads. Java interop. Super parallelization. The beauty of Lisp.

I can already hear people chanting Tapestry 6 (and “here we go again”). What I have planned is not a replacement for Tapestry, it’s a different kettle of fish for a completely different set of users entirely. Rather than taming Java to provide developer productivity, it’s about unleashing Clojure towards the same goal. What it won’t get into is the trap of doing everything automatically, such as assigning unique ids, mapping query parameters to data, and so forth; instead it will leverage Clojure to make doing those things concise even as they are completely customizable.

What is Cascade?

Cascade is an action-oriented web framework written in idiomatic Clojure. Although it initially grew out of ideas adapted from Apache Tapestry, it has now moved into its own space. Unlike Tapestry, Clojure templates are written inline, as idiomatic Clojure: an embedded DSL.

Clojure templates appear in code, but look like Clojure:

(defview index
    [:head>title "Example Template" ]
      "Cascade is complete unto itself, it "
      [:em "does not" ]
      " use external template files."

You can see the HTML structure, but there’s room for function calls and even macros.

What if Clojure had a web framework that cherry picked the best ideas from Tapestry? Localization, message catalogs, assets, automatic GZIP compression, automatic javascript aggregation, live namespace reloading. Clojure as the implementation language, Clojure as the property expression language.

The central concept in Tapestry is that the framework and components should solve all your problems for you. People love it when that happens, and hate it when the components fall even one inch short.

The central concept in Cascade is that you have the tools to easily and elegantly solve your own problems.

Foundations of Cascade

Cascade builds on top of Ring and Compojure.

Compojure bundles jQuery, RequireJS, and Twitter Bootstrap.