document.getElementById function. Support for this
document object is provided by browser runtime environment.
One might ask that this can be done using many frameworks out there such as ASP.NET, Django, Spring etc. But there are many features that make node stand out of already available tools. These features are explained next.
Node.js provides many reasons to choose it. They are
1. Node can be used to create highly scalable and fast applications.
3. Since node uses the same language at both front and back ends, your codebase becomes more consistent since you can use the same naming conventions, tools and logic everywhere.
4. For most of the features you require in your application, there are bright chances that there is some open source library already available. This means that there is no need for developing that feature from scratch, you will get it ready made. This is due to a large ecosystem of libraries that are available to use with node.
Node.js has many distinguishing features which make it a modern choice for creating backend services.
Asynchronous request processing: Asynchronous means non-blocking. Suppose a request arrives at node to read a file and return its contents. Node does not wait for the file to be read instead, it performs this operation in background and receives another request. This is called asynchronous processing and this is what makes node very fast.
One might argue that all server side frameworks work in the same way in that they allocate a separate thread for each request which is responsible for processing that request. But when there are many concurrent requests, the application might run out of threads and it may be required to add more hardware but with node it is never required.
Single Threaded: As explained above, node uses a single thread for request processing which minimizes the need for heavy hardware.
Very Fast: Node is built on Chrome’s V8 engine which highly reduces its request processing time.
Node website describes it as