

An expanded comment on Clojure web development - lkrubner
https://hackworth.be/2014/02/05/an-expanded-comment/

======
beat
On a related question, what are the good blogs or communities to follow for
Clojure web development? I just recently (like within the past two weeks)
started using Clojure to rewrite some back end code that was getting pretty
gross in Ruby. I'm building a rest api using compujure, and it's been very
pleasant, but I know I'm going to need more tools and more help soon.

~~~
danenania
I'd say following the clojure mailing list is the best way to stay current.
Most clojure-related blog posts/resources/new libraries get posted there, and
the discussion quality is high.

[https://groups.google.com/forum/#!forum/clojure](https://groups.google.com/forum/#!forum/clojure)

------
adambard
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.

~~~
auvrw
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 (>__> ?)

~~~
moomin
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.

~~~
auvrw
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?

------
erichmond
For what it's worth, I've been working on a RESTful API service in clojure,
and I've been using Liberator, and been loving it.

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.

~~~
moomin
And for the most part, there's a serious commitment to composability. e.g. You
can add liberator to your luminus project seamlessly without re-engineering.

------
VMG
I'm interested in a toolchain for cutting down on the editor-edit/server-
restart/browser-refresh cycles. Is there any development in the direction of
meteor that can help me make development a live experience?

~~~
weavejester
There are two approaches you can take.

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.

~~~
billrobertson42
The first option is really easy to get started with. It can get a little
clunky though when you suddenly need a repl, because now you need a new window
(be it terminal or emacs).

------
jbeja
I am just using what the "Web Development with Clojure" book by Dmitri
Sotnikov is telling me to use since i am a beginner in Clojure web
development. also learning Reagent for the client stuff :).

------
espeed
I've moved to [http://pedestal.io](http://pedestal.io) for Closure Web.

------
joeevans
hoplon is cool, too

