Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is node.js used for? [closed]

Tags:

node.js

Is it a web server or a programming language for server-side scripts?

like image 634
Manuel de Leon Avatar asked Oct 05 '22 02:10

Manuel de Leon


People also ask

What does NodeJS do exactly?

Node. js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node. js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

How is NodeJS used in front end?

The Node. js runtime allows developers to build both front and backend applications using only JavaScript. This means no more context switching between different languages like PHP for the backend and JavaScript for the frontend. Once seen as a toy language for amateurs, Node has revolutionized the web.

Why should I not use NodeJS?

js receives a CPU bound task: Whenever a heavy request comes to the event loop, Node. js would set all the CPU available to process it first, and then answer other requests queued. That results in slow processing and overall delay in the event loop, which is why Node. js is not recommended for heavy computation.

Is NodeJS used for frontend or backend?

This is not the case; Node. js can be used on the frontend as well as the backend. The event-driven, non-blocking nature of Node. js frameworks is one of the reasons it is a popular choice for developers designing a flexible and scalable backend.


2 Answers

From Node.js website

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Event-driven means that the server only reacts when an event occurs. This allow us to create high performance, highly scalable, “real-time” applications.

Finally, this is probably the best article that will get you excited about Node.js

like image 61
Ahmad Alfy Avatar answered Oct 28 '22 14:10

Ahmad Alfy


Directly from the node.js tag wiki, make sure watch some of the talk videos linked there to get a better idea.


Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript Engine.

Node.js - or just Node as it's commonly called - is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-usability of code and the lack of context switching.

It's also possible to use matured JavaScript frameworks like YUI and jQuery for server side DOM manipulation.

To ease the development of complex JavaScript further, Node.js supports the CommonJS standard that allows for modularized development and the distribution of software in packages via the Node Package Manager.

Applications that can be written using Node.js include, but are not limited to:

  • Static file servers
  • Web Application frameworks
  • Messaging middle ware
  • Servers for HTML5 multi player games
like image 43
Ivo Wetzel Avatar answered Oct 28 '22 13:10

Ivo Wetzel