I'm using my ported version of Hiccup [1] to ClojureScript for a while
now and share most of my templates between Clojure on the server, and
ClojureScript on the client side with good sucess. It can sometimes
get a little bit hairy to share code between the 2 platforms, but I
hope something like Common Lisp's feature expressions [2] will make it
into Clojure and ClojureScript soon. When this arrives, life will be a
lot better ...
Just for fun, I benchmarked my Hiccup port against the other candidates.
Running Hiccup and Dommy in advanced mode get's the time towards unoptimized jQuery.
Compilation Mode: Advanced (Crate and jQuery don't run in advanced mode)
{:dommy 1.3436666666666666, :hiccup-str 1.0293333333333334, :hiccup-node 1.3506666666666665}
One thing to note: The original Prismatic tests were building jQuery
Nodes and appended them to an UL element. Building strings and
appending those to the node speeds the whole thing up a little bit
further [3]. In the above benchmark :hiccup-node uses DOM nodes to
append to the root, :hiccup-str uses Javascript strings.
I can only agree. Using a Hiccup like template system in Clojure is very nice.
Remote: Yes
Willing to relocate: No
Technologies: Clojure, ClojureScript, PostgreSQL, GraphQL
GitHub: https://github.com/r0man/
LinkedIn: https://www.linkedin.com/in/roman-scherer-488246b6/
Email: roman@burningswell.com