Answer the question
In order to leave comments, you need to log in
For which tasks is Node.js a better choice over other platforms?
For what tasks and situations is Node.js a better choice than other platforms?
There are on a glance:
- front assembly,
- back if a full-stack developer with knowledge of only js is engaged,
- tasks where fast input / output is required (chats (and what else?))
Maybe something else?
Are there tasks other than frontend and Node.js (maybe other platforms) where js is required as a scripting language?
Answer the question
In order to leave comments, you need to log in
As a matter of fact,
there should be order on the backend, the use of js, combined with a lack of understanding of how to build the backend correctly, leads to the popularization of the opinion that node.js on the backend is the wrong solution.
I’ll make a reservation right away, the wrong decision is not to use node.js on the back, but to use a programmer who does not know how the back is built, how to work with databases and get the most out of them.
Separately about js. IMHO, the use of pure js on the backend is only permissible where the code base does not exceed 200-300 kb of code, otherwise there may be difficulties.
The solution is to use ts plus a combination of available frameworks.
From what you can and should look at:
nest.js is a very strong framework that allows you to write like large monoliths. and microservices, very frontend friendly on angular
inversify.js - strong DI express (combined with inversify-express-utils)
,
fastify - low-level frameworks for http
socket.io - sockets with channel support
or other business tasks, the coverage is less than that of Java, but the node will be more economical in terms of the load on the machines.
I will not compare with PHP at all, there is no performance there.
I know jsa very bold statement
You diluted holivar and people write with boiling water which language is better. But in fact (oh my God, he will reveal the secret) everyone is good. You need to start writing a project on what you are best at, and then when there will be (if any) problems, then they will already be solved. When there is a problem then you will see which tool suits you best.
The node is great for backing and gets along well next to python and c# in microservices.
JS is good because it is both front and back. It is possible to rummage the general code. At the very least, ideal for startups. simple, fast development - and nothing else is needed at the beginning. If you compare with Facebook in terms of the number of users, then you can think about Go there, but it probably won’t be in the first year? A thousand more technologies will appear there. In short, nodejs is good for everything web related :)
Basic:
A node is a single-client local backend that allows you to work with "cloud" resources in the global network.
Briefly: for the tasks of building distributed computing clusters.
For example, there are a lot of different computers / servers (nearby, or remote) and many, many different tasks.
It is required to use all available resources in an optimal way and ensure the fault tolerance of such a network.
Well, or when you need to quickly create a beautiful application that interacts with a remote web server: https://nwjs.io/
PS: for those who consider PHP an outsider in terms of performance: read .
Reactive websites.
There is such a term: Server Side Rendering, it is mentioned most often in connection with Vue and React technologies.
Reactive frameworks "collect" content on the client, and node js allows the same code to be used on the server so that it can serve pages ready for SEO.
Cross-platform mobile applications.
They are created using React Native technology and the like.
Cross-platform applications for PC.
This is usually the Electron framework. For example, the now popular VS Code was created using this technology.
so everything is simple
Node.js is the preferred choiceif you don't know anything besides js. that's all
You should not write a backend in JavaScript, this language was developed for other needs and let's not pull an owl on a globe if you need a good reliable language where 'false' is not true but still false, there are mature solutions to choose from: c#, java, and the younger but no less successful golang, these are the languages for the backend, with good support for asynchrony, channels, parallelism if necessary, and a powerful infrastructure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question