Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webjure vs compojure?

I've heard of two Clojure based web application frameworks: Webjure and Compojure. Can someone let me know which is better?

like image 294
user43737 Avatar asked Jan 11 '09 21:01

user43737


3 Answers

Now you can add Ring to the list. All of these frameworks are very new and likely to evolve (or die) quickly, but Compojure does seem to be the most actively developed based on the past 6 months or so.

"Better" is too subjective a question to get a definitive answer to. Try them all and see what works.

like image 185
Brian Carper Avatar answered Oct 16 '22 04:10

Brian Carper


Compojure has been working very well for me so far. I like the simplicity of the design, the flexibility and the fact that it encourages a nice idiomatic functional style.

Sample server:

(use 'compojure)

(defroutes my-app
  (GET "/index.html"
    (html 
      [:h1 "Hello World!!"]
      [:body "This is some text"]))
  (ANY "*"
    [404 "Page not found"]))

(run-server {:port 80}
  "/*" (servlet my-app))

Note that Compojure uses Ring internally.

like image 25
mikera Avatar answered Oct 16 '22 05:10

mikera


I second Rayne's recommendation on Moustache.

Right now, we are using Ring (base layer, middleware), Moustache (routing), Hiccup (html generation). We just began using Compass for CSS (http://compass-style.org/). So far, I'm happy with this collection of small libraries rather than a big "complete stack" framework (Django, Rails, ect...).

like image 3
wilkes Avatar answered Oct 16 '22 06:10

wilkes