Answer the question
In order to leave comments, you need to log in
What is the strength of Node.js?
Can you please explain what is his power? Is it something revolutionary or ? Combining front and back? Asynchronous work? Yes, there is nothing serious on it yet, but why? Complexity? Is it inferior to Php ?
PS It's just that this topic is extremely interesting to me.
Answer the question
In order to leave comments, you need to log in
The strength is that everyone knows JS. Who can write PHP/Ruby/Python? Those who write in PHP/Ruby/Python respectively (and say 10%-15% of the number of everyone who can write in at least two of the three languages. Who can write in JS? All front-enders + what good 60%-70% of all these php/ruby/python/java/c# developers...
What does it give? HUGE community... most of the cattle of course, but due to the huge number of developers, the toolkit just started to develop very quickly. Who needs a tool written in Ruby if it can be written on JS and it will be able to be supported by an order of magnitude more people?
The issue of performance at first stood as the main feature of the language. Everyone screamed at last, V8 on the server, asynchrony! The fastest interpreted language on the planet and all that. But in reality, everything is a little more complicated. JS is really fast. Compared to the same Ruby, it is many times faster! But by and large, adequate people do not care about this from a high bell tower, since js is not asynchronous at all. JS runs on a single thread. Moreover, the garbage collector also works in the same thread. If he starts cleaning everything, everything will freeze. Usually this is not a very big problem, but somehow funny. Asynchronous in JS is only work with IO, which is implemented on the pluses / c ...
There is also no revolution. JS on the server is not a new idea and has been practiced for 5 years before. It was just a very successful implementation, but if not for the V8, then everything would not have been so cool.
As for comparison with PHP etc. These are tools for different areas. PHP - web site development. node.js - daemons, development tools, data buses, data delivery, etc. For everything else, PHP is more suitable. There are really a couple of interesting projects whose main goal is to eliminate code duplication on the server and on the client .... but these developments are only suitable for very simple projects so far (although everything is relative).
If you are flattered by the new, fast, modern, with a cool design and also where Google influenced - golang.
You can read here .
Written a lot of interesting things and everything will immediately become clear.
To the above words, I will add the use of Node.js-a by frontends for the frontend. How? Basically Bower + Grunt . And there are many advantages:
In general, for me, Node.js is not just a new framework and access to a large number of opersor libraries that reduce development costs (with the right approach and good techniques), but also, a kind of workflow for the frontend.
Of the minuses, I note that periodically there are problems with the same "third-party" libraries. For example, NoSQL data bases (I worked with MongoDB via Mongoose ), which are convenient to code on the backend and frontend, have significant restrictions on sampling, and sequalize is not flexible enough for some tasks (and the asynchronous style of coding for a node is more difficult to accept and maintain than the usual transactions directly to the database). In general, a lot depends on the architecture of the server application on the node and the potential of the dependencies used.
And I have a question - what about urls there? For SEO. site.com/page-about-me ?
1. As they said, it's very cool that this is one language on the frontend and backend. This is perhaps the most basic and valuable advantage over many other backend technologies if you are developing not just a web page, but a dynamic web application.
And I note that it doesn’t even matter what it is javascript. What is important is the reuse of modules and components on both sides, as well as a single "ecosystem". This is often underestimated, they start comparing different aspects, for example, php vs javascript, go vs javascript, but this is not so important.
2. Once again, the language used in a node can be used for desktop applications (nodewebkit) and mobile applications (phonegap).
3. NodeJS is not only server applications, but also various console utilities and various devs. scripts.
There is another aspect: architecture . In Node.Js, the NPM format (the npmjs.com package manager ) encourages the encapsulation of specific functionality in specific modules. This, of course, is not Java or C #, but the very atmosphere of the community stimulates the development of a competent modular architecture, perhaps better than smart books on the "classics" of Java and C ++.
Its strength is in C, and gigabytes of memory, and processor cores - so if you want super strength, write modules using nginx =)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question