|
|
|
|
|
by galaxyLogic
2306 days ago
|
|
Much of the client-side code is about manipulating the DOM. Such code must assume the DOM-API exists. So such code can not run on the server unless there is some kind of ducky DOM environment there as well. And since client-side relies much on destructively manipulating the DOM, how can such code be tested on the immutable clojure server? > sizeable parts of the code are cross-compiled to run both on the browser But not all, right? I think the challenge would be knowing which parts can run on both the client and server, so you can know which parts can be moved between client and server. But code is typically intended to run on either the server, or the browser. What would be the practical benefit of moving code between those environments? I have not used Clojure so I'm asking because I have a similar circumstance with Node.js on the server, and DOM-manipulating JavaScript on the browsers, and its not easy to move code between those environments, and secondly, I don't much see the need for doing so. Naturally testing everything on the server would be nice, but I'm not sure how my DOM-manipulating client-code can be tested on the server. |
|
Essentially the app was developed as an isometric app, and we had some additional stuff in the server part of the application.
While running ClojureScript serverside might not be everyone's cup of tea, it worked well for us.