Clojure web frameworks for responsive apps
Asked Answered
T

1

7

I have recently inherited a non-finished web app written in Clojure, based on compojure and hiccup basically. It's a bad attempt to model some sort of MVC with OO style not in the FP style as seen here . So I bet to re-start the project almost from the scratch reusing the useful parts. I consider these alternatives:

The least breaking alternative would be Compojure+Enlive+jquery-pjax

Using a clojure web framework like Pedestal Any experiences about this?

The initial idea was to implement a RESTful API serving JSON so for the more elaborated solution I have Backbone+react.js in my mind for the front-end and Liberator for the back-end but it's likely to take longer to develop than a traditional server app.

Thoughts and alternatives taking into account that an Ajax experience is required please, thanks a lot!

Tobi answered 2/1, 2014 at 2:42 Comment(3)
For the front-end you might want to consider clojurescript+OM (based on react) by David Nolen. Check out this insightful blogpost by the creator swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs for more infos.Mentally
Thanks rene_gr, I already knew OM which is awesome btw. But we'd like to code the client-side in JavascriptTobi
Also considering seriously luminusweb.net after realizing most of the available flavours are composed of selected libraries over Ring+Compojure base.The contenders are Luminus and Caribou actually, I'd love to hear some comparison from it's authors or someone with experience in production apps with both.Tobi
D
5

I'm not sure what is the relation between RESTful API and responsive in your post. However ...

You have multiple options here: Pedestal, Liberator and Caribou.
If all what you need is a RESTful API, then I think Liberator is your best bet and it is not going to take longer time as you mentioned. I don't know how you got that impression.

Pedestal shines if you want to develop Single-Page applications but the framework in general requires a good time to grasp and understand how it is works.

Have a look at Caribou also. It is easy to use and feel familiar.

But again, it is your choice.

Diablerie answered 2/1, 2014 at 9:25 Comment(3)
Thanks, Caribou seems to be pretty well designed. I wonder if someone has experience integrating it with [github.com/cgrand/enlive](Enlive) templates. Regarding the time consideration I meant to use a fully decoupled front-end like Backbone.js or whateverTobi
@JamesSharp broken Enlive link.Fuel
thanks @pate, cannot edit so here you have it EnliveTobi

© 2022 - 2024 — McMap. All rights reserved.