3 ms·
The value proposition is "You can use the same code on both the server and client" (in addition to "You already know Javascript"). That's a really big advantag
by nostrademons 10y ago
The value proposition is "You can use the same code on both the server and client" (in addition to "You already know Javascript"). That's a really big advantage in some cases. Think of collaborative editing (where you need to apply operational transforms on all clients + the server), or form validation, or game replay, or anything where you want to give real-time feedback to the user while also validating those operations on the server.
If all you're doing is throwing HTML templates on top of CRUD results, then yeah, Node.js doesn't get you much. But there are other problem domains where you're basically forced into it. My first startup (WYSIWYG casual game creation) would've been much easier if Node had existed when I was working on it; I spent a ridiculous amount of time writing polyglot Javascript/Actionscript runtime libraries and server-side compilers that would spit back a blob of Javascript in an AJAX request.
- imron 10y ago> That's a really big advantage in some cases That will mostly disappear with WebAssembly, and then we can finally start using sane languages for front-end web development.
- romaniv 10y ago>The value proposition is "You can use the same code on both the server and client" With differences in standard libraries, environment specifics and even language features available, I think a far more accurate statement would be "you can sometimes use some code on both the server and client".