Node.js 的发明者将Javascript程序拓展到浏览器之外

标签: node js 发明 | 发表时间:2012-01-31 21:09 | 作者:matthewgao
出处:http://www.yeeyan.org

译者 matthewgao

Node.js inventor extends JavaScript programming beyond browsers Interview: Ryan Dahl discusses why his invention is catching fire with developers

Node.js 的发明者将Javascript程序拓展到浏览器之外 采访: Ryan Dahl 解释为什么他的发明能够让开发者着迷

By Paul Krill | InfoWorld Follow @pjkrill

By Paul Krill | InfoWorld Follow @pjkrill

Print|Add a comment

The open source project Node.js was invented by Joyent software engineer Ryan Dahl three years ago next month. It essentially allows JavaScript to be used outside of a browser. Node leverages Google's V8 JavaScript virtual machine to interpret JavaScript, and it uses an event-driven non-blocking I/O model that cloud services vendor Joyent -- a principal Node advocate -- says makes it ideal for data-intensive and real-time applications running across distributed devices. It is also championed by companies such as Microsoft and Mozilla.

三年前的下个月,Joyent的软件工程师 Ryan Dahl 开发了Node.js 这个开源项目。他使得Javascript能够运行于浏览器之外。Node使用Google的V8 Javascript虚拟机来解释Javascript,使用Joyent云服务提供商提供的由事件驱动的无阻塞I/O模型,这是Node提倡的一个原则--它能够有效的用分布式设备来处理数据密集的实时应用。这同时也被微软和Mozilla这样的公司所支持

InfoWorld Editor at Large Paul Krill spoke with Dahl at the Joyent-sponsored Node Summit conference, which is being held in San Francisco.

InfoWorld 的编辑Paul Krill 和 Dahl 在在旧金山举行的由Joyent赞助的Node高峰会议上进行了对话

[ Node.js is an InfoWorld 2012 Technology of the Year Award Winner. For more insight on software development, subscribe to InfoWorld's Developer World newsletter. ]

[Node.js 是Infoworld 2012 年度技术奖的获得者。想得到更进一步的关于软件开发的内容,请订阅InfoWorld世界开发者时事通讯]

InfoWorld: Node is basically server-side JavaScript framework, right?

InfoWorld:Node 实际上是一个服务器端的Javascript框架是么?

Dahl: Yes. It's a programming platform. Node is a way of doing programming with JavaScript, but on your computer instead of inside the Web browser so you can interact with the operating system and whatnot.

Dahl:是的,是一个编程平台。Node是一个用Javascript进行编程,但是运行在电脑上而不是运行在web浏览器上的一个方案,所以你能够与操作系统等进行交互。

InfoWorld: What's the main benefit?

InfoWorld:他的主要好处是什么?

Dahl: Node does things a bit differently than other programming platforms. The main thing is that it handles I/O very differently, so it doesn't allow the user to lock up the program, ever. It keeps the user handling new things, so it's very useful for network programming. You often are dealing with many people at the same time on your server and you're juggling these different connections. Node encourages the developer to continue to process connections without blocking. And because of this model of handling I/O, users tend to find it easier than developing with a traditional programming language for servers.

Dahl:Node和其他编程平台在运行上有些不同。主要的是在I/O控制上非常不同,所以不允许用户挂起程序。它使得使用者控制新东西,所以他对于网络编程非常有用。你通常会在服务器上同时处理很多人的请求,并且处理不同的连接。Node鼓励开发者持续的处理连接而不阻断它。因此这种处理I/O的模型让使用者能够更容易的用传统的程序语言做服务器端的开发。

InfoWorld: Why is Node catching fire, so to speak?

InfoWorld:这就是说为什么Node火了?

Dahl: It just turns out that a lot of people like to program in JavaScript, and so there's been a lot of interest from users to develop stuff.

Dahl:产生的结果是很多人喜欢用Javascript编程序,所以在使用者开发的时候有很多乐趣。

InfoWorld: Is there an issue with running Node on Windows?

InfoWorld:有什么办法可以让Node在Windows上运行么?

Dahl: Well, the port to Windows is a lot newer than the Unix implementation and does have a couple of bugs. But generally users are using it fine. It tends to be working well. Of course, it'll get better over time.

Dahl:当然,给Windows平台的接口是要比Unix上的新,所以一定会有一些Bug。但是基本可以很好的运行。

InfoWorld: Are there any particular advantages of Node as far as platform-as-a-service cloud computing and cloud computing in general?

InfoWorld:对于Paas云计算和普通的云计算Node有没有什么特别的优势?

Dahl: Well, it's JavaScript, which is a nice thing. And it has this nice little API that is somewhat compact. So I think it makes for a nice platform-as-a-service platform in general. It also does network communication.

Dahl:当然,它是Javascript,一个非常好的东西。它有如此精巧的紧凑的API。所以它对于Paas的云计算平台非常有效,同时对于网络通信也非常有效。

InfoWorld: How many people are developing with Node? What's the growth rate for Node?

InfoWorld:有多少人在用Node做开发?Node的成长率是多少?

Dahl: It's a bit difficult to quantify, though the way that we usually measure this is by the number of modules that have been deployed with Node or developed with Node. We're currently at about 6,000 modules. These are various modules to connect to Twitter or to parse some random disk format, [for example].

Dahl:这个很难衡量,我们实际上是通过有多少个使用Node或者用Node开发的模块来统计的。我们现在又大概6000个模块。这些不同的模块连接到Twitter或者解析一些随机的磁盘格式,[例如]。

InfoWorld: What would be the ideal situation for Node and where would you not want to use it?

InfoWorld:Node在什么情况下用是最理想的,什么情况下不能用?

Dahl: Ideally, it's for servers where you're juggling many connections, with a lot of I/O happening in the server. It's not so good for batch jobs where you're doing a bunch of serial tasks and it doesn't really matter how long they take, you're just running them at the end of the day. There it becomes unwieldy due to the non-blocking nature of it.

Dahl:理想上,用于那些要处理非常多的有大量I/O的连接的服务器。对于那些只在每天的结束才会运行,并不在意运行多久的批处理工作并不合适。它会由于无阻塞的特性而使得他变得笨拙。

This article, "Node.js inventor extends JavaScript programming beyond browsers," was originally published at InfoWorld.com. Follow the latest developments in business technology news and get a digest of the key stories each day in the InfoWorld Daily newsletter. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

“Node.js 的发明者将Javascript程序拓展到浏览器之外”这篇文章原文发布在InfoWorld.com,属于最新商务技术开发新闻,每天在InfoWorld时事通讯中得到文章摘要,更多最新商务技术开发新闻在Twitter上关注InfoWorld.com

Paul Krill is an editor at large at InfoWorld, focusing on coverage of application development (desktop and mobile) and core Web technologies such as HTML5, Java, and Flash.

Paul Krill 是InfoWorld的一个编辑,关注与应用开发(桌面和移动应用)和WEB技术,例如HTML5,JAVA和Flash

Tags: javascript, paas

相关 [node js 发明] 推荐:

node js 断点调试

- - Web前端 - ITeye博客
大部分基于 Node.js 的应用都是运行在浏览器中的,. 例如强大的调试工具 node-inspector. node-inspector 是一个完全基于 Node.js 的开源在线调试工具,提供了强大的调试功能和友好. 的用户界面,它的使用方法十分简便. 首先,使用 npm install -g node-inspector 命令安装 node-inspector,然后在终.

什么是Node?

- We_Get - 博客园新闻频道
译者按:前不久Oreilly出了一本小册子“What is Node?”,扼要的讲解了Node的身世和所适用的场景,作者文笔轻松流畅、内容充实,是非常难得的学习资料.   译文全文:http://jayli.github.com/whatisnode/index.html.   作者:Brett McLaughlin ,原文:What is Node?.

Node入门

- - CSDN博客编程语言推荐文章
作者:  Manuel Kiessling. 翻译:  goddyzhao &  GrayZhang &  MondayChen. 本书致力于教会你如何用Node.js来开发应用,过程中会传授你所有所需的“高级”JavaScript知识. 本书绝不是一本“Hello World”的教程. 你正在阅读的已经是本书的最终版.

浅析Hadoop Secondary NameNode,CheckPoint Node,Backup Node

- - CSDN博客云计算推荐文章
Hadoop SecondaryNameNode并不是Hadoop 第二个NameNode,它不提供NameNode服务,而仅仅是NameNode的一个工具. 这个工具帮助NameNode管理Metadata数据. NameNode的HDFS文件信息(即Metadata)记录在内存中,client的文件写操作直接修改内存中的Metadata,同时也会记录到硬盘的Edits文件,这是一个Log文件.

[译]什么是Node?

- blacktulip - Taobao UED Team
译者按:前不久Oreilly出了一本小册子“What is Node?”,扼要的讲解了Node的身世和所适用的场景,作者文笔轻松流畅、内容充实,是非常难得的学习资料. 译文全文:http://jayli.github.com/whatisnode/index.html. 作者:Brett McLaughlin ,原文:What is Node?.

用node作桌面开发

- InterMa - CNode社区
node的定位是,server-side javascript. 但程序员最爱做的事,就是把一个东西用在不该用的地方. 那么,可以把node用在桌面开发上吗. 把Javascript用在桌面开发上,早有先例,比如GTK+的gjs,还有Qt的QML(顺带一提,QML代表着桌面开发的另一个方向,a promising way),GNOME3中,也用javascript作为桌面插件的开发语言.

無痛安裝 NodeJS 和 Node Framework Express

- Hming - 小惡魔 - 電腦技術 - 工作筆記 - AppleBOY
直接到官網下載 Stable 的版本吧,目前是 node-v0.4.10.tar.gz,也可以先看看 API Document. 安裝 Ububtu 相關套件. 下面會使用最原始的編譯方式,所以必須安裝 g++ 套件,否則下 ./configure 的時候,會吐出來沒有安裝過的套件. 兩種方法:1.用 apt-get install nodejs 2.

nodejs上HTML分析利器node-jquery

- - 博客园_首页
      首先描述产生这篇随笔的场景:我需要获取项目在jenkins构建的最新Javascript Coverage显示在供管理层次查看的项目情况Report上,但是由于jenkins没有直接的API取得数据所需数据,所以我们只能从自建的容器发布Javascript Coverage数据API,供Report项目使用.

我们为什么使用Node

- - 移动开发 - ITeye博客
引言:Node 已经迅速成为一个可行并且真正高效的web 开发平台. 在Node 诞生之前,在服务端运行JavasScript 是件不可思议的事情,并且对其他的脚本语言来说,要实现非阻塞I/O 通常需要依赖特殊的类库. 但Node 的出现改变了这一切. 本文选自《Node.js硬实战:115个核心技巧》,让我们跟着本文快速的复习一下Node是什么以及他的主要特性有哪些.