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.

相关推荐
程序员爱钓鱼18 小时前
Node.js 编程实战:博客系统 —— 用户注册登录与文章管理
前端·后端·node.js
JaredYe18 小时前
用 Node.js 从旧版 PPT 中提取文本:轻量开源工具 ppt-to-text
node.js·powerpoint·ppt
TDengine (老段)18 小时前
TDengine Node.js 语言连接器入门指南
大数据·开发语言·物联网·node.js·vim·时序数据库·tdengine
余道各努力,千里自同风18 小时前
node.js 操作 MongoDB
数据库·mongodb·node.js
爱敲代码的婷婷婷.19 小时前
patch-package 修改 node_modules流程以及注意点
前端·react native·前端框架·node.js
一念一花一世界19 小时前
Arbess项目实战 - 基于GitLab搭建Node.js项目自动化流水线
ci/cd·node.js·自动化·gitlab·arbess
全栈前端老曹19 小时前
【包管理】npm最常见的10大问题故障和解决方案
前端·javascript·rust·npm·node.js·json·最佳实践
咔咔一顿操作20 小时前
nvm安装Node后node -v正常,npm -v提示“无法加载文件”问题解决
前端·npm·node.js
zsd_3120 小时前
npm指定本地缓存、安装包、仓库路径
前端·缓存·npm·node.js·私服·安装包·本地
前端付豪1 天前
必知 Express和 MVC
前端·node.js·全栈