3 ms·
It should be noted that Clojurers are very much about having composable libraries with narrow applicability. In Sinatra or Flask, you get a server (interface),
by adambard 14y ago
It should be noted that Clojurers are very much about having composable libraries with narrow applicability.
In Sinatra or Flask, you get a server (interface), a routing syntax, and built-in templating.
In Clojure, you have Compojure, which handles routing, Ring, a server abstraction for requests, and responses, and the templating library of your choice. (I've used Hiccup and Enlive, as well as Mustache and Markdown). You're responsible for gluing them together, which is really not too hard given the power of the language to create abstractions on the fly. This results in slightly more code, but also makes it much easier to replace or augment any one component.
- weavejester 14y agoTo be fair to Sinatra, it uses Rack underneath, and farms out templating to different libraries. It's certainly more of a framework than Compojure is, but it's not monolithic by any means.
- swah 14y agoIn one particualr website, it was much simpler when I removed Compojure. I remember thinking that was pretty cool. (Seeing clearly what Compojure did and dropping it in favor of a simple hashtable).