--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Something lacking with CLJX/CLJC AFAIK is that you can't target *both* Node.js and the browser from the same Clojure code base.
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/T6no_srtBzc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.
Sounds great. Definitely looking forward to blog post when you get to it!
> Is anyone out there working on a pattern of framework for isomorphic ClojureScript?
Yes, I am, it's basically a shell Clojure/Pedestal app that calls into a specific ClojureScript interface where the entire application is defined as a single page app, it prefetches the initial ajax payloads, supports URL redirects and can heal incorrect URLs to the canonical URL, works with <head> content, supports 404s etc. It's very very fast! Sooner or later I will write a blog post. It's not a lot of code though it did take some amount of thought.
> Is anyone out there working on a pattern of framework for isomorphic ClojureScript?
Yes, I am, it's basically a shell Clojure/Pedestal app that calls into a specific ClojureScript interface where the entire application is defined as a single page app, it prefetches the initial ajax payloads, supports URL redirects and can heal incorrect URLs to the canonical URL, works with <head> content, supports 404s etc. It's very very fast! Sooner or later I will write a blog post. It's not a lot of code though it did take some amount of thought.
Marc, Unfortunately I wrote this for a client so it's not open source yet. I'll post here when I get around to it.
--
Yes, 99% of the application logic is defined in clojurescript e.g. Routing and Ajax queries, there is a very small amount of JVM code which uses nashorn to call into a specific interface exposed in clojurescript which knows how to render html, check if a url is canonical, redirect or compute initial state and render html for that state, and some other minor things. However it does constrain the way you structure your clojurescript application, for example Ajax has to happen in a certain structured way to make this work smoothly. Really the only tricky bit is getting the builds structured just perfectly as not all browser dependencies work in nashorn (no dom). There are five build targets: dev-browser, dev-server, prod-browser, prod-server and figwheel. Debugging sucks.
The following book isn't our yet, but it's written by a real javascript expert. Pretty sure we will find inspiration to do isomorphic CLJS apps.
https://leanpub.com/learn-javascript-react-nodejs-es6/