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.

相关推荐
图灵苹果34 分钟前
【个人博客hexo版】hexo安装时会出现的一些问题
前端·前端框架·npm·node.js
新知图书7 小时前
Node.js运行环境搭建
node.js
南辞w8 小时前
Webpack和Vite的区别
前端·webpack·node.js
等你许久_孟然10 小时前
【webpack4系列】webpack构建速度和体积优化策略(五)
前端·webpack·node.js
营赢盈英10 小时前
Using OpenAI API from Firebase Cloud Functions in flutter app
ai·node.js·openai·googlecloud·firebase
刘懿儇14 小时前
NVM(node.js版本工具)的使用
node.js
沙漏无语17 小时前
npm 设置国内镜像源
前端·npm·node.js
架构师ZYL19 小时前
node.js+Koa框架+MySQL实现注册登录
前端·javascript·数据库·mysql·node.js
flytam19 小时前
node.js 中的进程和线程工作原理
node.js
好奇的菜鸟20 小时前
解决 Node.js 项目中的 Yarn 安装错误
node.js