r/Clojure • • Apr 17 '16

The State of Clojure Web Development

http://yogthos.net/posts/2016-04-17-state-of-web-clj-dev.html
74 Upvotes

51 comments sorted by

View all comments

2

u/un_passant Apr 18 '16

What I don't really get in the state of Clojure Web Development is why pedestal did not really take off. Is it just because Ring was too entrenched and good enough of am I wrong in considering that pedestal server was better ? Pedestal client side was also the only client API that made sense to me until re-frame. I like Luminus (especially with Immutant !) and am a grateful and happy buyer of the "Web Development with Clojure" book, but I put some money on Kickstarter for Arachne to help move forward pedestal-server.

4

u/yogthos Apr 18 '16

I think the main problem with pedestal is that there still isn't any simple way to get running with it. If you take what Luke says in his pitch on the context of the Pedestal stack then it's bang on.

I also don't think there's anything inherently better about Pedestal than the Ring stack. Pedestal is complected by design, while the Ring stack is modular. For example, I can run different routing libraries like Compojure or Bidi on to of Ring. Meanwhile, Pedestal decides on how the routing is done for me.

That said, I agree that it would be nice to see the Pedestal stack more forward as well.

3

u/levand Apr 19 '16

Routing in Pedestal isn't complected with anything. Routes are implemented in terms of the Interceptor abstraction in a strictly analogous fashion to the way Compojure builds routes on top of the handler function abstraction.

You can easily use Pedestal without using Pedestal routing. It would actually take about 10 minutes to set up Compojure on top of Pedestal (although at that point you'd lose most the benefits Pedestal provides over Ring).

Not that it matters that much, just wanted to clarify :)

Arachne, for what it's worth, replaces half of Pedestal's routing layer. It still uses the underlying data-based route definitions and super-fast prefix-tree route resolution, but the user-facing syntax and API for creating routes will be completely different (and much better, IMO)

1

u/yogthos Apr 19 '16

Fair enough, I was under the impression that routing was baked in. Glad to be corrected on that point. :)

I definitely like the idea of using data structures to describe routes internally, but providing a more readable API to the user. I've actually considered doing something similar with Bidi. I'd like to use a Compojure style API to declare routes, but then have the library parse it and turn it into data that can be manipulated later on.