28

Ok this is probably a little blunt and to the point, but what is the point/need for Node.js

I've noticed it mainly through CloudFoundry but just not too sure what its supposed to be doing. However I am guessing its probably something pretty big as why else would VMWare be supporting it.

Thanks in advance.

Jeff Sloyer
  • 4,837
  • 1
  • 22
  • 46
Clive
  • 3,861
  • 3
  • 16
  • 15
  • I know there are lot of answers but let me simplify it.There are 2 basic uses of Node:- 1. It helps to run JavaScript outside the browser. This will help us to create stand alone JS applications. 2. If you see the number of JS open sources they are huge in numbers. So if want to get Jquery i need to go to their site see the latest version , if want to get Angular i need to see where the the file are. Node has a concept called as NPM which is central repository to get these open sources. This video explains both the above concepts practically https://www.youtube.com/watch?v=-LF_43_Mqnw – Shivprasad Koirala Feb 12 '17 at 19:04

5 Answers5

20

It's an...

  • Efficient and 100% event driven IO framework,
  • flexible enough to use the best underlying OS features it can find,
  • presenting an API in a high-level programming language (the same language your client-side will most-likely use),
  • implemented on top of the best available intepreting engine for that language, and
  • supporting more and more third party libraries with each passing day.
  • Effecient in server side api, avoid using for CPU intensive operation

:)

GunasekaranR
  • 169
  • 1
  • 11
slezica
  • 69,920
  • 24
  • 96
  • 160
14

Node.js does IO right. It's asynchronous and non-blocking and the beauty of using js is that it does not have a standard blocking IO.

It's fast (v8 is a beast), it scales well, It's got a vibrant community and it's popular.

There are lots of wonderful libraries that run on node like now and socket.io.

It excels at real time communication and highly concurrent websites.

It also has the added bonus of less code duplication. You can write the same MVC code on the client as the server and easily support non-js users.

Further reads:

Community
  • 1
  • 1
Raynos
  • 162,380
  • 56
  • 343
  • 392
9

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.

The node.js tag has some more background information to point you in the right direction: https://stackoverflow.com/tags/node.js/info

Community
  • 1
  • 1
recursive
  • 80,919
  • 32
  • 145
  • 234
7

Node leverages Javascript's first class functions to allow you to program the server in a dynamic scripting language while getting very competitive performance.

Node isn't as fast as Haskell, Erlang or Go. But it is competitive with Java, and it outperforms Ruby, Python and PHP.

Haskell, Erlang, Go, Java, Ruby, and Python all have evented IO webframeworks, but they also have blocking libraries to serve as pitfalls.

Despite it's warts, Javascript is the lingua franca of the web and since browsers are evented, not only is Javascript built for evented style programming, most web developers are used to writing evented Javascript.

Also check out this register article: http://www.theregister.co.uk/2011/03/01/the_rise_and_rise_of_node_dot_js/

generalhenry
  • 16,997
  • 4
  • 46
  • 63
  • Do you have any benchmarks on haskell & Go being faster? – Raynos Jun 01 '11 at 22:19
  • http://www.ostinelli.net/a-comparison-between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/ – generalhenry Jun 01 '11 at 22:22
  • http://www.yesodweb.com/blog/2011/3/preliminary-warp-cross-language-benchmarks – generalhenry Jun 01 '11 at 22:22
  • Those cover Haskell & Erlang. I want a statement saying Go is faster then node. The haskell comparisons are also unfair due to not using multiple node processes to scale across cores. I can believe haskell has an edge but its not overwhelming – Raynos Jun 01 '11 at 22:32
  • I've seen ones that also include Go, but google is ironically bad at searching for Go (or golang since it's mostly referred to as Go) – generalhenry Jun 01 '11 at 22:32
  • 1
    Go and Haskell are strongly typed and compiled with multiprocessor concurrency models deeply embedded in the language. They're faster, they use less memory. But they're are reasons Node.js has a larger community. (and why I personally use Node.js) – generalhenry Jun 01 '11 at 22:36
2

This post might help:

Why Developers Should Pay Attention to Node.js

Matt Roberts
  • 25,301
  • 30
  • 99
  • 172