Re:Clojure-powered Startups
by spacemanaki on Friday June 22, 2012 @02:26PM
(#4148025)
> I like even more the idea of being able to have a HTML/CSS/etc expert, who doesn't necessarily know Clojure, be able to maintain the HTML instead of me.
Check out Enlive, it solves exactly this problem. HTML/CSS is separate from Clojure code and you fill out templates and stuff via CSS style selectors. It's sweet.
https://github.com/swannodette/enlive-tutorial
https://github.com/cgrand/enlive
Btw I think you can use Enlive with Noir, even though some of the examples from Noir use Hiccup, it's not a requirement.
That tutorial is truly excellent - I’ve been looking for something to replace Hiccup, and this looks to be it!
At Circle [1] are doing practically all of our HTML on the client side. Our server exposes an API using Noir, and we had to build a lot of our own stuff on top of that, like authentication. I added coffeescript and hamlcoffee support to dieter [2]. HTML emails are templated in mustache.
[1] https://circleci.com [2] https://github.com/edgecase/dieter
I'm a fan of mustache. There is an excellent implementation for Clojure: https://github.com/davidsantiago/stencil
I prefer Enlive: https://github.com/cgrand/enlive
I'm using hiccup for HTML.
Here I gave an overview of my experiment in building a web app entirely in Clojure: http://notehub.org/2012/6/16/how-notehub-is-built
While I really like the idea of writing HTML in Clojure, I like even more the idea of being able to have a HTML/CSS/etc expert, who doesn't necessarily know Clojure, be able to maintain the HTML instead of me.
Has anyone found what they think is a good solution?