Live data from Hacker News

Ask HN: Why Node.js and for which type of App?

news.ycombinator.com

21–30 of 49 posts

Re: Ask HN: Why Node.js and for which type of App?

#21
post #10

Node.js in itself is a wrapper around V8, the JavaScript engine of Google Chrome. It is used to execute JavaScript on the server for example to implement REST APIs. I would consider Node.js if you implement actual webbased software because you could take advantage of a shared codebase. If you want to display content on the internet there are more comfortable alternatives you could use. What you are probably looking f…

Hi there, thanks for your response. I programmed some Desktop Apps with Java and C#. And during some hackathons i used python+flask+nginx to implement a Web-Applications with a RestAPI on the backend. I was just curious for which type of application i can use node.js (since i didn't use javascript on the backend at all). Usually i used PHP, C# or Pyhton for the backend.. Is MS Windows 10 using node.js for their appli…

I think you can develop Windows 10 apps using JavaScript, but as far as I know Node.js isn't involved. I think Microsoft promotes Node.js more so that people use their Azure platform to host Node.js applications.

Re: Ask HN: Why Node.js and for which type of App?

#22
post #20

I've been use node.js for the server part of my browser multiplayer game. It's been a great decision due to the amount of shared code I have between the client and server. For example, I share the physics code which is responsible for controlling the simulation that runs on both the server (authoritative) and clients (for predictions). I no longer have to switch languages which also saves a lot of time!

This sounds pretty interesting, is it open source? Can I check out a demo?

Re: Ask HN: Why Node.js and for which type of App?

#23
post #10

Earlier quoted context omitted.

Hi there, thanks for your response. I programmed some Desktop Apps with Java and C#. And during some hackathons i used python+flask+nginx to implement a Web-Applications with a RestAPI on the backend. I was just curious for which type of application i can use node.js (since i didn't use javascript on the backend at all). Usually i used PHP, C# or Pyhton for the backend.. Is MS Windows 10 using node.js for their appli…

I do not think, that node.js is involved in the JavaScript apps for Windows. In your place I would test node.js the next time you do something like you did with Flask. If you now C#, I would not recommend to waste time to implement a node-based Windows GUI app.

i will try it! :) thanks!

Re: Ask HN: Why Node.js and for which type of App?

#24
You can use it for a lot of different application types. It's typically used for web as most web developers already know some Javascript. It's also very lightweight, portable and has a lot of great features that other web languages either don't or don't do as nicely as Node. Asynchronicity for example.

People have also used it for desktop applications, with a few desktop UI library wrappers. Githubs text editor 'Atom' for example.

Node also has a great set of API's for interacting with the system and network utilities, so there's a lot of great tools for networking and automation.

Finally, because Javascript is so lightweight, we're seeing it play a key role in the 'Internet of Things'. Some micro-controllers are even written in JS (see Tessel).

So don't feel as though it's for one thing or another, just have fun with it and explore the language and its potential!

Re: Ask HN: Why Node.js and for which type of App?

#25
You can use it for a lot of different application types. It's typically used for web as most web developers already know some Javascript. It's also very lightweight, portable and has a lot of great features that other web languages either don't or don't do as nicely as Node. Asynchronicity for example.

People have also used it for desktop applications, with a few desktop UI library wrappers. Githubs text editor 'Atom' for example.

Node also has a great set of API's for interacting with the system and network utilities, so there's a lot of great tools for networking and automation.

Finally, because Javascript is so lightweight, we're seeing it play a key role in the 'Internet of Things'. Some micro-controllers are even written in JS (see Tessel).

So don't feel as though it's for one thing or another, just have fun with it and explore the language and its potential!

Re: Ask HN: Why Node.js and for which type of App?

#26
post #11

Node.js is typically used for servicing web applications, but it has found some other surprising uses as well. There's a fairly sizable robotics (check out Johnny-Five) and drone community around it as well. The programming editor Atom by Github is also a "traditional" desktop app with Node.js at the core. In my opinion, Node's biggest advantage today is the absolutely massive module ecosystem that has sprung up arou…

> The programming editor Atom by Github is also a "traditional" desktop app with Node.js at the core.

Nope, Atom it's based on electron[0] itself which use io.js and Chromium as a core.

[0] https://github.com/atom/electron

Re: Ask HN: Why Node.js and for which type of App?

#27

You can use it for a lot of different application types. It's typically used for web as most web developers already know some Javascript. It's also very lightweight, portable and has a lot of great features that other web languages either don't or don't do as nicely as Node. Asynchronicity for example. People have also used it for desktop applications, with a few desktop UI library wrappers. Githubs text editor 'Atom…

I am not sure it can be called 'very lightweight'. The runtime itself has a large disk footprint, my node_modules is often 100s of MB, and the memory usage is quite heavy too (idle Ghost.org blog takes around ~100MB RSS).

Some of the APIs are not very portable either, such as fs.watch. Many npm libraries implicitly depend on Linux or OS X.

It's convenient though, sure.

Re: Ask HN: Why Node.js and for which type of App?

#28
NodeJs' non-blocking IO makes it a great choice for near real-time communication, like streaming editors, messaging, reacting to high freq events (like metrics). See: http://socket.io, http://en.m.wikipedia.org/wiki/Surespot and https://github.com/etsy/statsd

It is also great when you want to prototype a REST backend, and get it up and running in no time. The simplicity of javascript along with nodejs' module ecosystem make it a breeze (Ruby equivalent would be Sinatra).

What nodejs isn't good at is, parallelism. Concurrency is handled for you for free by the underlying libuv eventing framework. Pseudo-parallelism is achieved using 'clusters' but communication between node processes is costlier than in other languages that support parallelism out of the box.

Read https://news.ycombinator.com/item?id=4305486 for aphyr's excellent commentary on clojure vs nodejs (you can also find Ryan Dahl defending nodejs in a few cases there)

Re: Ask HN: Why Node.js and for which type of App?

#29
Node on desktop is still in early stage, there are some projects but node shines on server side, not only for web/http (mega simple), but also any other application protocols or lower. It's not hard to make socket and do whatever you want + async = win.

On the other hand it's javascript, so :-)

Re: Ask HN: Why Node.js and for which type of App?

#30
post #26
post #11

Node.js is typically used for servicing web applications, but it has found some other surprising uses as well. There's a fairly sizable robotics (check out Johnny-Five) and drone community around it as well. The programming editor Atom by Github is also a "traditional" desktop app with Node.js at the core. In my opinion, Node's biggest advantage today is the absolutely massive module ecosystem that has sprung up arou…

> The programming editor Atom by Github is also a "traditional" desktop app with Node.js at the core. Nope, Atom it's based on electron[0] itself which use io.js and Chromium as a core. [0] https://github.com/atom/electron

I think under this context, a student asking about node’s uses, drawing the distinction between io and node isn’t really relevant, especially since there are plans to merge the two.[1] But thanks for the link, didn’t know about Electron, seems really cool.

http://www.infoq.com/news/2015/05/nodejs-iojs

Post reply on HN