什么是Node.js? [英] What is Node.js?

查看:129
本文介绍了什么是Node.js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不完全了解 Node.js 的全部内容。也许是因为我主要是一个基于Web的业务应用程序开发人员。它是什么以及它的用途是什么?

I don't fully get what Node.js is all about. Maybe it's because I am mainly a web based business application developer. What is it and what is the use of it?

到目前为止我的理解是:

My understanding so far is that:


  1. 编程模型是事件驱动的,尤其是它处理 I / O

  2. 它使用 JavaScript 和解析器是 V8

  3. 它可以很容易用来创建并发服务器应用程序。

  1. The programming model is event driven, especially the way it handles I/O.
  2. It uses JavaScript and the parser is V8.
  3. It can be easily used to create concurrent server applications.

我的理解是否正确?如果是,那么即使I / O有什么好处,它对于并发性的东西更多吗?另外,Node.js的方向是成为基于JavaScript(基于V8的)编程模型的框架吗?

Are my understandings correct? If yes, then what are the benefits of evented I/O, is it just more for the concurrency stuff? Also, is the direction of Node.js to become a framework like, JavaScript based (V8 based) programming model?

推荐答案

我认为优点是:


  1. 在VM上以动态语言(JavaScript)进行Web开发,速度非常快(V8)。它比Ruby,Python或Perl快得多。

  1. Web development in a dynamic language (JavaScript) on a VM that is incredibly fast (V8). It is much faster than Ruby, Python, or Perl.

能够以最小的开销处理数千个并发连接。

Ability to handle thousands of concurrent connections with minimal overhead on a single process.

JavaScript非常适合具有第一类函数对象和闭包的事件循环。人们已经知道如何使用它在浏览器中使用它来响应用户发起的事件。

JavaScript is perfect for event loops with first class function objects and closures. People already know how to use it this way having used it in the browser to respond to user initiated events.

很多人已经知道JavaScript,甚至是人谁不自称是程序员。它可以说是最流行的编程语言。

A lot of people already know JavaScript, even people who do not claim to be programmers. It is arguably the most popular programming language.

在Web服务器和浏览器上使用JavaScript可以减少两个可以通信的编程环境之间的阻抗不匹配通过JSON的数据结构在等式的两边都是相同的。可以在服务器和客户端等之间共享重复的表单验证代码。

Using JavaScript on a web server as well as the browser reduces the impedance mismatch between the two programming environments which can communicate data structures via JSON that work the same on both sides of the equation. Duplicate form validation code can be shared between server and client, etc.

这篇关于什么是Node.js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆