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.

相关推荐
亮子AI16 小时前
【npm】npm 包更新工具 npm-check-updates (ncu)
前端·npm·node.js
Yvonne爱编码16 小时前
构建高效协作的桥梁:前后端衔接实践与接口文档规范详解
前端·git·ajax·webpack·node.js
Juchecar19 小时前
AI教你常识之 ESM + Express + Vue3 + CSV文件 + Pinia + CRUD
node.js
召摇21 小时前
Nue.js深度解析:极简主义前端框架的革新实践
前端·node.js
木辰風1 天前
idea npm install 很慢(nodejs)
前端·npm·node.js
wyzqhhhh1 天前
组件库打包工具选型(npm/pnpm/yarn)的区别和技术考量
前端·npm·node.js
csdn_aspnet2 天前
使用nvm管理node多版本(安装、卸载nvm,配置环境变量,更换npm淘宝镜像)
npm·node.js
Juchecar2 天前
AI教你常识之 ESM + Express + EJS + 表单POST + CSV文件
node.js
xiaopengbc2 天前
在Webpack中,如何在不同环境中使用不同的API地址?
前端·webpack·node.js
Gogo8162 天前
java与node.js对比
java·node.js