3 ms·
The article misses the biggest advantage: writing browser & server code in the same language is a huge win. Libraries can be shared. It is easy to move function
by tlb 15y ago
The article misses the biggest advantage: writing browser & server code in the same language is a huge win. Libraries can be shared. It is easy to move functionality back and forth. You can have one implementation of input validation logic instead of two.
- mcs 15y agoBut is that worth writing everything in an asynchronous pattern?
- bphogan 15y agoI would love to see a concrete, documented example of this code sharing between the server-side and client-side. I'm not interested in "context switching" but I am extremely interested in how to actually share code between the two environments; I believe this is part of the key to creating more accessible content. Could you point me to something I could look at further?
- iambot 15y agoYou should check out the Browserify module by @substack. It packages even native nodejs code to work in the browser. Seriously just check it out, I can't do it justice: https://github.com/substack/node-browserify https://github.com/substack/node-browserify