5 ms·
Our Bones[1] library for node.js does this, in most applications we have written probably in excess of 90% of the code is shared between server and client. We
by AdrianRossouw 15y ago
Our Bones[1] library for node.js does this, in most applications we have written probably in excess of 90% of the code is shared between server and client.
We have written cloud based hosting systems[2], desktop applications[3] and more standard web applications with it. I think it wouldn't be too hard to make it possible to build phonegap'esque apps with it too.
It's pretty great stuff, but it opens you up to very new and interesting problems due to the environment being so different. The client side has absolutely no concept of a 'request', and there is a lot of stuff that just can't be done on the client (is this email address unique?). The server side does not have the long running state that the client does, which causes another category of problems.
I think it's going to become a more dominant approach, because it's just so damn convenient, but it's going to take a bit more time to properly 'crack' it.
[1] bones : http://github.com/developmentseed/bones http://github.com/developmentseed/bones
[2] mapbox hosting : http://mapbox.com/tour/ http://mapbox.com/tour/
[3] tilemill : http://mapbox.com/tilemill/ http://mapbox.com/tilemill/