An expanded comment on Clojure web development
hackworth.be
hackworth.be
Basically, I'd recommend luminus until you get opinions of your own (e.g. I rather like bidi).
(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 (>__> ?)
Sinatra's lovely, though.
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?
The one thing I've really loved about the clojure community is the willingness to take a step back from the problem at hand and the attempt to understand what kind of architecture could address that problem, as opposed to just porting an existing idea/architecture to clojure.
The ring/ring-devel library includes middleware that reloads modified files (ring.middleware.reload), and this is included by default with the Lein-Ring plugin.
The second approach is to run the server from within the REPL, and to have functions to reload modified files and restart the server. There are libraries like Component and Jig that provide a framework for this style of development.
The trend seems to be toward the second, though it requires a little more work than the first option.