News for hackers. Stuff that matters.

Ask HN: What is Node.js? Framework, VM, stdlib or a platform?

What is the place of Node.js on a standart stack? It's like VM but, V8 is like. It's framework-like, but not. JavaScript is the language, V8 is the interpreter and the VM-ish...

I'm completely confused. Can someone help me to figure it out?

( 10 comments | 8 points | on HN )
Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by chm on Monday April 28, 2014 @03:35AM (#7658684)
Hmmm... Try these tidbits:

NodeJS is a JS interpreter. You can run Node and execute JS code inside it. Node is written in C/C++, like V8, and so it can be compiled for a lot of architectures. You can therefore run JS code "natively" on a machine. Node is single-threaded, event-driven, and can do IO. It's not a framework. It has a set of standard features (just like Python has a standard library) like an HTTP server for example. Frameworks for Node are written in JS and use the standard library to facilitate development of complex apps. Express is a popular Node framework to write web servers.

Need more?

http://en.wikipedia.org/wiki/NodeJS

http://radar.oreilly.com/2011/07/what-is-node.html

http://stackoverflow.com/questions/1884724/what-is-node-js

http://www.makeuseof.com/tag/what-is-node-js-and-why-should-...

Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by fka on Monday April 28, 2014 @03:44AM (#7658705)
Is NodeJS "like V8" or "on V8"?
Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by hasancc on Monday April 28, 2014 @04:09AM (#7658778)
neither. It just uses v8 to execute the interpreter output which is still javascript code.

V8 converts javascript to machine code, and node.js basically acts as a middle man to add functionality to javascript like "event driven programming" which can't be implemented through a basic framework.

Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by fka on Monday April 28, 2014 @04:18AM (#7658795)
Are you sure? v8 itself is already event-driven. If not, Chrome wouldn't work event-driven.
Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by hasancc on Monday April 28, 2014 @04:40AM (#7658863)
Yes Chrome is event driven, but Chrome is a sandbox which limits your I/O capabilities. Node.js on the other hand, is obviusly not a browser, so you can actually do I/Os with the system not only the sandbox.
Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by CmonDev on Monday April 28, 2014 @04:57AM (#7658901)
http://en.wikipedia.org/wiki/Reactor_pattern#JavaScript

It's an implementation of the Reactor pattern basically.

Sits somewhere between an inflated library and a higher-level framework (since there are packages).

Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by ilaksh on Monday April 28, 2014 @05:07AM (#7658930)
JavaScript is generally NOT interpreted anymore. For the majority of runtime it is running as native code. Node.js is a platform. If you are that confused then you will need to spend a few weeks using it to understand it.
Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by sdogruyol on Monday April 28, 2014 @04:06AM (#7658769)
Actually Node is a well packaged platform-like runtime built mainly upon these : V8, libeio, libuv and others ( DNS, OpenSSL e.g )

What makes it unique is that you use Node Standart Library with Javascript to harness the power of those.

Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by cabbeer on Tuesday April 29, 2014 @11:18AM (#7667559)
Here is a seminar from the edx cs50 series on node:

https://manual.cs50.net/seminars/#_node_js

There's also a bunch of other really good ones

Re:Ask HN: What is Node.js? Framework, VM, stdlib or a platf... by ankurdhama on Monday April 28, 2014 @04:47AM (#7658881)
A tool to build software systems.