Answer the question
In order to leave comments, you need to log in
What's wrong with Node.js?
I am new to javascript, just finished learning it. I was invited to participate in one project, where I will write the server part in Node.js, so to speak, get my hands on it and gain at least some practice in JS.
Having told this news to their friends, they began to spit on the node and scold it. It was said that node.js is slow and it is humiliating to write server-side in JS in general. One friend said about Node.js "They didn't have enough code on the client, they also wanted to drag it to the server."
What's wrong with this Node.js? Why is he so scolded? What should I say in response to such reproaches? =)
Answer the question
In order to leave comments, you need to log in
High-load projects are written in any languages, many are written in php or perl. These languages cannot be called fast.
The fact that he holds some kind of load is simply ridiculous. It does not hold any load, javascript is quite slow, however, the same can be said about php.
The load is held by an asynchronous approach (not javascript!) which is used if you have an IO bound service, i.e. most of the time it does nothing, but just waits for a response from another service or database.
Solve some tasks that are CPU bound on node.js ... well, in general, this is not a suitable tool, because. the language is slow, everything will work slowly.
I personally have complaints about js that this language has few features and many crutches, although it is actively developing and many improvements can be seen in ES6. There are few libraries in node.js, they are raw and slow. I compare with Python, but even PHP has advantages here. There is no full web framework on node.js like Django, RubyOnRails or Yii. Of course it's a matter of time, but so far everything is damp.
node.js and asynchronous approach.
On a node, most libraries are asynchronous, if you want to write something synchronous, then you will have problems.
The asynchronous approach is neither good nor bad, it is a tool for solving certain problems.
People using the same node use the asynchronous approach everywhere, they are forced. But it's like hammering nails with a microscope - for a long time it's expensive, inconvenient and unreliable.
An asynchronous approach is needed to solve specific problems. C# or Python have language constructs that make asynchronous programming easier, but there is nothing like that in node. Writing asynchronous code in JS is a pain in the ass. Any anync and promise improve the situation a little, but the problem remains.
Node.js has its own niche. Nobody writes a regular server on it, but they write a middle layer between the server side and the client side to work at very high loads. In addition, long gone are the days when node.js was still quite green and suffered from a bunch of childhood illnesses. Today it is a full-fledged development platform, which has acquired a bunch of plugins and frameworks. Take a look at https://www.meteor.com/
First, let them give arguments, otherwise you can “spit” and “scold” just like that, out of the blue, say “slow” and “humiliating” - these are just empty propaganda words. I recently asked a specialist why ZeroMQ is fast? Answer: he is on steroids, it is written in the docks. So, to explain phenomena without facts, you can simply give them clever names. Why objects fall is gravity, but ... well, everything is immediately clear here. Why the node is bad - because it's shitty code. I add more methodological instructions to holivars: the article "How to recognize an idiot during a discussion"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question