Re:Bringing functional to the frontend – Clojure and Clojure...
by ibdknox on Thursday January 17, 2013 @02:35PM
(#5074679)
In terms of performance, wouldn't it be far faster to use strings and turn those into document fragments or setting innerHTML? I've been looking at ways to make crate much faster and it seems that would be the fastest solution by far.
Re:Bringing functional to the frontend – Clojure and Clojure...
by zcam on Thursday January 17, 2013 @03:10PM
(#5074897)
That's the approach Hiccups took, it goes as far as generating most of the html at compile time as well.
I didn't run benchmarks but I would guess it is faster than crate in some situations (huge fragments, older browsers etc).
Another plus is nodejs compatibilty (if you care about that, but I guess you might :)).
Also out of the box, you get a repl to live test and evaluate template functions and data structure. It would only take a few lines of emacs lisp to take a string from the repl and pipe it through XHTML validation.