3 ms·
I have some experience with sharing js libraries between server side and client side. It can be nice but comes at a price: you'll bring all the problems of cli
by bobfunk 16y ago
I have some experience with sharing js libraries between server side and client side. It can be nice but comes at a price:
you'll bring all the problems of client side javascript to the serverside without any of the nice client side js-frameworks that makes cross-browser coding more sane.
We're using rhino serverside with the latest CSV version giving us full ECMAScript 5 compatibility on the serverside - but for the parts that are also used clientside we can forget about all the nice features of Rhino. For our clientside code we're using jQuery, but again, when sharing with the server we can forget about all of jQuery's utility methods and so on...
It's worth doing but it is not at all as smooth as it could be...
- mdg 16y agoI'm using Rhino + jQuery + env.js + Postgres for processing html and it works great. None of the code will ever need to run on the client so being in total control of the environment is liberating. Oddly, jslint.js is just fine on either end of the spectrum, but probably isn't intended for your end-user.