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.

相关推荐
GISer_Jing24 分钟前
前端构建工具(Webpack\Vite\esbuild\Rspack)拆包能力深度解析
前端·webpack·node.js
chxii3 小时前
1.11 HTTP 文件上传的核心协议
node.js
CRPER3 小时前
告别繁琐配置:一个现代化的 TypeScript 库开发模板,让你高效启动项目!
前端·typescript·node.js
終不似少年遊*4 小时前
【软测】node.js辅助生成测试报告
软件测试·测试工具·node.js·postman·web
Q_Q51100828511 小时前
python+django/flask成都奥科厨具厂产品在线销售系统
vue.js·spring boot·python·django·flask·node.js·php
Westrious13 小时前
【JS里的小函数】帮助你在全局作用域中创建和访问对象的函数
前端·javascript·node.js
水冗水孚14 小时前
使用nodejs的express框架实现大文件上传的功能,附完整前后端github代码
javascript·node.js·express
Q_Q51100828514 小时前
python+django/flask+uniapp宠物中心信息管理系统app
spring boot·python·django·flask·uni-app·node.js·php
chxii1 天前
1.13使用 Node.js 操作 SQLite
数据库·sqlite·node.js
程序猿小D1 天前
第32节 Node.js 全局对象
linux·vscode·node.js·编辑器·vim