4 ms·
Great article! The only thing I'd do differently is just serve up the js as a static file instead of using code transformation. That seems likely to break for n
by sigil 15y ago
Great article! The only thing I'd do differently is just serve up the js as a static file instead of using code transformation. That seems likely to break for non-trivial amounts of js.
- ericmoritz 15y agoYeah, Generate the data (JSON) that the javascript will work with, don't generate the javascript. That way we can have easy to serve, easy to cache static javascript.
- funcall 15y agoGenerated JavaScript can be served and cached just like static .js files. It doesn't have to be embedded in the HTML.
- funcall 15y agoI beg to differ. I've used ClojureJS (a Clojure to JavaScript translator) for building a non-trivial web app front end, and the result has not only been robust but also a pleasure to build (from a Lisp programmer's point of view). [Disclosure: I'm the author of the ClojureJS library]
- sigil 15y agoInteresting. What's the site, and is the original Clojure source before -> js transformation published somewhere?
- funcall 15y agoWe're not launched yet (but, close). I'll definitely post about it when we're live. I'm not sure how much of the Clojure (subset) code we'll publish, but I'll write more about our process and experience once we're launched.