Re:An expanded comment on Clojure web development
by adambard on Thursday February 06, 2014 @01:54PM
(#7192180)
I think it's definitely worth starting with just compojure, or even just ring. I don't know of any other language/library where writing request/response handlers is so approachable ( notwithstanding any commentary on the lisp syntax or functional style); even Flask and Sinatra require a routing layer.
[ Parent
| on HN ]
Re:An expanded comment on Clojure web development
by moomin on Thursday February 06, 2014 @02:17PM
(#7192307)
Luminus is basically just a set of sane defaults for Ring. Anything substantial (e.g. cljs-ajax) is split out into its own library.
Basically, I'd recommend luminus until you get opinions of your own (e.g. I rather like bidi).
Re:An expanded comment on Clojure web development
by auvrw on Thursday February 06, 2014 @06:43PM
(#7193720)
ah, i dunno, compare
(defroutes app
(GET "/" [] "<h1>Hello World</h1>"))
and @app.route('/hello')
def hello():
return "hey"
seems about equivalent.EDIT: except for the inherent awesomeness of s-expressions (>__> ?)
Re:An expanded comment on Clojure web development
by moomin on Friday February 07, 2014 @03:12PM
(#7198424)
It's worth pointing out that in the first case what you get is a pure function that you can test without any mocking whatsoever.
Sinatra's lovely, though.
Re:An expanded comment on Clojure web development
by auvrw on Saturday February 08, 2014 @08:30PM
(#7203779)
heh, i wouldn't know anything about ruby. that was flask, of course.
the promise of clojure to me (aside from liking lisp) is similar to that of node: only having to maintain one codebase for both client and server sides.
also, really should say thanks to the author of the original article. returned here today when i realized that korma doesn't create tables and i'll need .... lobos, apparently, which was not mentioned in any of my searches for such a library. why didn't this submission get more upvotes?