I am still figuring out a lot of things about Python, and this is something I found very intriguing. What would the differences between an IM app written in Python using Flask and it's nodeJS clone be, to a user?
Ask HN: Why Node.js and for which type of App?
31–40 of 49 posts
Re: Ask HN: Why Node.js and for which type of App?
#32Having used Node.js recently for a high volume service my feeling is it is best for lots of network communication.. but not long running or CPU/disk intensive operations. So, we're slowly transitioning to a Go backend with a slim Node.js layer to form the very friendly API while we use some RPC between the Node and Go. In this, Node.js is amazing and--I would guess--hard to beat. EDIT: Clarify with "CPU/disk intensiv…
Re: Ask HN: Why Node.js and for which type of App?
#33Node.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?
#34The three most important reasons to use Node.js: it uses JavaScript which you might want to learn already, and second, it has a big ecosystem of modules and frameworks, including by companies like Microsoft and Google, and third, there is more JavaScript code on GitHub than any other language, if you're looking into contributing to open source projects or learning from them.
What you can do with Node.js:
JavaScript was already important as the language of the web browsers. As soon as JavaScript was split off from the web browsers thanks to the Node.js project, people have been writing web servers as well as command-line tools with it. It's also used to create interactive cross-platform native mobile apps and chrome/firefox extensions.
As a bonus, the asynchronous nature of JavaScript and its ubiquity in web browsers as well as web servers has lead to the creation of a wealth of official and unofficial standards and implementations of libraries for creating real-time chat and systems.
If you can do most everything in one language, why not?
Edit: someone already wrote a more technical overview, if you would like one:
Re: Ask HN: Why Node.js and for which type of App?
#35Why learn Node.js: The three most important reasons to use Node.js: it uses JavaScript which you might want to learn already, and second, it has a big ecosystem of modules and frameworks, including by companies like Microsoft and Google, and third, there is more JavaScript code on GitHub than any other language, if you're looking into contributing to open source projects or learning from them. What you can do with No…
Re: Ask HN: Why Node.js and for which type of App?
#36Why learn Node.js: The three most important reasons to use Node.js: it uses JavaScript which you might want to learn already, and second, it has a big ecosystem of modules and frameworks, including by companies like Microsoft and Google, and third, there is more JavaScript code on GitHub than any other language, if you're looking into contributing to open source projects or learning from them. What you can do with No…
Don't forget non-blocking I/O.
I left that out because some commenters mentioned that as the leading feature. But for somebody who's asking what Node.js is used for, I don't think being asynchronous is as important a reason as the fact you're writing JavaScript with great tooling, frameworks, and modules.
As far as coding day-to-day, there are other languages that have better semantics around writing asynchronous code. And it rarely makes a difference for first-time developers until they actually build something and try to scale, and at that point would need to read articles about doing that with Node.js just like they would with Ruby/Rails, Clojure, Go, etc.
Re: Ask HN: Why Node.js and for which type of App?
#37I found Node.js to be quite difficult to work with, mostly due to nature of Javascript. Module ecosystem is vast, but each one has an API written in a different style. Combine that with no type-checking and lack of robust IDE auto-completion (Webstorm is quite disappointing at the moment) - and you get a frustrating experience. Oh, and also add asynchronicity into the mix. Making restful APIs is quite fun with it, th…
Re: Ask HN: Why Node.js and for which type of App?
#38Reading all the comments here makes me wonder — Can Python (say, Flask) not be used for real-time communication (SocketIO, etc..) ? What is the difference between that and node.js ? I am still figuring out a lot of things about Python, and this is something I found very intriguing. What would the differences between an IM app written in Python using Flask and it's nodeJS clone be, to a user?
Re: Ask HN: Why Node.js and for which type of App?
#39Reading all the comments here makes me wonder — Can Python (say, Flask) not be used for real-time communication (SocketIO, etc..) ? What is the difference between that and node.js ? I am still figuring out a lot of things about Python, and this is something I found very intriguing. What would the differences between an IM app written in Python using Flask and it's nodeJS clone be, to a user?
Re: Ask HN: Why Node.js and for which type of App?
#40Reading all the comments here makes me wonder — Can Python (say, Flask) not be used for real-time communication (SocketIO, etc..) ? What is the difference between that and node.js ? I am still figuring out a lot of things about Python, and this is something I found very intriguing. What would the differences between an IM app written in Python using Flask and it's nodeJS clone be, to a user?
See also, aiohttp [2] which seems very promising (Python 3.3+). As an aside, I've never seriously considered Python 3 till now after taking a look at aiohttp.
[1] https://flask-socketio.readthedocs.org/en/latest/ [2] http://aiohttp.readthedocs.org/en/stable/web.html