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.

相关推荐
星栈11 小时前
从装一堆工具到看懂 Node 工程化思维:我的项目复盘记录
后端·node.js
东方小月13 小时前
从零开发一个Coding Agent:monorepo项目搭建
前端·后端·node.js
Lihua奏14 小时前
# 用 Node.js 连接数据库:一次请求是怎么跑起来的?
node.js
kisshyshy18 小时前
给端侧大模型装上“发动机”:React 合成事件 + 进度条组件全解
前端·react.js·node.js
csdn2015_21 小时前
nodejs安装
node.js·vue
前端双越老师2 天前
如何以前端视角(非0基础)学 Java ?
java·node.js·全栈
Kel2 天前
Node.js 没那么复杂
人工智能·node.js·全栈
星栈独行2 天前
Node 接口该写同步还是异步?
服务器·开发语言·后端·程序人生·node.js
星栈3 天前
Node 接口该写同步还是异步?
后端·node.js
半个落月3 天前
用 LangChain 连接远程 MCP:从工具发现到多轮调用闭环
人工智能·后端·node.js