What is Node.JS and its Pros and Cons

What is Node.JS and its Pros and Cons

JavaScript is a client-side development tool.

Node.js is a server-side development tool. And it's only a runtime environment based on Chrome V8 so we don't write some code in Node.js.

Pros:

JavaScript on a server

First I want to emphasis that Node.JS is just a runtime environment of JavaScript. Express is based on Node.js. So based on Node.JS, the project can inherit JavaScript merit (lightweight, fewer code compared with Java or C) and can use its libraries.

And front-end and back-end can use the same language.

Code for microservices

Node module can help implement microservice philosophy. To be specfic, a project is made up of many modules which are isolated and independent. You can just fix or add one module, which doesn't influence other module.

Fast

Node.JS is event-based and single thread . It can process several events concurrently, which leads to improve CPU usage.

Support and Community

There are many companies which use Node.js. And there are many people in Node.js community to provide many solutions and solve the issues.

Packages

There are many packages to solve different problems in NPM. NPM is a place that can install packages.

Easy to learn

Node.JS inherit many features of JavaScript.

Cons:

CPU bottleneck

Because Node.JS is single-thread. So if there are many heavy-computation requests, the thread pool will block. Sometimes we can "expand" the thread pool.

Immature tool

NPM registry is not mature.

Few experienced developers

There are few Node.JS developers who has 2 years or more experience.

相关推荐
Ares-Wang38 分钟前
net Core》》包与库 LibMan、NPM
前端·npm·node.js
观无3 小时前
VsCode开发环境之Node.js离线部署
ide·vscode·node.js
GUIQU.6 小时前
【Node.js】Web开发框架
前端·node.js
别看我只是一只杨女士16 小时前
node.js如何实现双 Token + Cookie 存储 + 无感刷新机制
node.js·jwt·cookie·双token
诸葛亮的芭蕉扇7 小时前
StreamSaver实现大文件下载解决方案
前端·javascript·vue.js·node.js
故事与九8 小时前
基于 Node.js 的 HTML 转 PDF 服务
pdf·node.js·html
GUIQU.14 小时前
【node.js】数据库与存储
数据库·node.js
黑风风1 天前
Ubuntu 安装 Node.js 指定版本指南
ubuntu·node.js·vim
GUIQU.1 天前
【node.js】入门基础
node.js
flex88881 天前
【开源】一个基于 Vue3 和 Electron 开发的第三方网易云音乐客户端,具有与官方客户端相似的界面布局
开源·node.js·vue