Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to distinguish node from JavaScript

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

How to distinguish between node and JavaScript, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Differences: 1. Javascript is a web front-end language, while Node is a platform that can quickly build network services and applications.

2. Javascript mainly applies front-end applications for web development, while Node mainly applies back-end applications to build servers. The operating environment of this tutorial: windows7 system, nodejs 14.15.4&&javascript1.8.5 version, Dell G3 computer.

What is node.js?

Node.js is a Javascript runtime environment (runtime).

What is the difference between Node.js and JavaScript?

Essence:

Javascript is a web front-end language, which is mainly used in web development and parsed by browsers.

Node.js is a platform that can quickly build network services and applications. It is a service platform built in Javascript language, which can be used to build servers at the back end.

Difference:

Javascript's main application front end is the programming language client programming language (which needs to be interpreted and executed by the browser's javascript interpreter) node.js 's main application back end is a platform running environment (a platform based on the Chrome JavaScript runtime, which encapsulates the Google V8 engine)

To put it simply, node.js encapsulates the interpreter of the browser as a server running platform, programs with a structural syntax similar to javascript, and runs on node.js.

What are the advantages of Node.js? What are Node.js 's shortcomings?

Advantages:

1. Event driven

two。 Asynchronous programming

3. IO in non-blocking mode

4. Light weight and high efficiency

Disadvantages:

1. Low reliability

two。 Single process, single thread, only support single-core cpu, can not make full use of multi-core cpu server. Once this process collapses, the entire web service collapses.

Node.js applicable scenarios? Scenarios where Node.js does not apply?

Applicable scenarios:

1.JSON APIL-build a Rest/JSON API service where node.js can take full advantage of its non-blocking IO model and javascript's support for JSON. [recommended: "nodejs tutorial"]

two。 Single-page, multi-Ajax request applications-there are a large number of asynchronous requests at the front end, which requires extremely high response speed at the back end of the server

3. Develop Unix command line tool based on node.js-node.js can generate a large number of child processes and output them as streams

4. Streaming data-traditional web applications usually treat HTTP requests and responses as atomic events. And node.js will take full advantage of streaming data to build very cool applications.

Does not apply to scenarios:

Applications with heavy cpu utilization and low io utilization

After reading the above, have you mastered the method of how to distinguish node from JavaScript? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report