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.

相关推荐
岁月宁静6 分钟前
从0到1:智能汇 AI 全栈实战,拆解多模态 AI 应用开发全流程
前端·vue.js·node.js
Q_Q5110082851 小时前
python+django/flask的宠物用品系统vue
spring boot·python·django·flask·node.js·php
嘴平伊之豬2 小时前
跟着AI速度cli源码三-交互问答系统
前端·node.js
扑棱蛾子3 小时前
前端代码一键打包上传服务器?10分钟配好永久告别手动部署!
前端·node.js
百***67034 小时前
Nodemailer使用教程:在Node.js中发送电子邮件
linux·运维·node.js
哆啦A梦15885 小时前
48 我的地址页面布局
javascript·vue.js·node.js
zyfts5 小时前
十分钟搞定Nestjs上传文件到阿里云OSS
后端·node.js
zwjapple8 小时前
Node.js 集成百度语音
node.js·语音识别
q***0568 小时前
使用Node.js搭配express框架快速构建后端业务接口模块Demo
node.js·express
哆啦A梦15888 小时前
40 token
前端·vue.js·node.js