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.

相关推荐
伍哥的传说1 小时前
H3初识——入门介绍之常用中间件
前端·javascript·react.js·中间件·前端框架·node.js·ecmascript
超级土豆粉2 小时前
npm 包 scheduler 介绍
前端·npm·node.js
WildBlue3 小时前
流式输出:前端工程师的魔术表演,小白也能看懂!🎩✨
前端·javascript·node.js
GDAL5 小时前
Node.js Stream 深入全面讲解
node.js
爱分享的程序员19 小时前
前端面试专栏-算法篇:20. 贪心算法与动态规划入门
前端·javascript·node.js
我叫黑大帅1 天前
Sequelize:让你和数据库唠嗑像聊微信一样简单 😎
后端·node.js
小山不高1 天前
本地使用minio之前后端关键点
前端·node.js
吓死羊了1 天前
设置nginx和tomcat开机自动启动
后端·node.js·tomcat
归于尽1 天前
浏览器和 Node.js 的 EventLoop,原来差别这么大
前端·node.js·浏览器
前端双越老师1 天前
30 行代码 langChain.js 开发你的第一个 Agent
人工智能·node.js·agent