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作为桌面插件的开发语言.

Vercel 部署 Node 服务

- - 掘金 前端
之前在写 面试常客:HTTP 缓存时,曾经就强缓存和协商缓存写过两个demo,但缓存要在服务端做,只能贴上代码,不能在网页上感受(虽然我贴了gif). 笔者的所有 demo 例子都放在 github page 上,其特点是不需要服务器即可部署静态资源,但它不具备部署服务端应用能力. 最近笔者在了解 CI/CD 方面的知识点,想起了 Vercel,就想着能否将服务端应用架在 vercel 上呢.

WebView JS 交互

- - ITeye博客
WebView加jquery做页面会怎么样呢. // 创建WebView对象. // 把programList添加到js的全局对象window中,. // 这样就可以使用window.programList来获取数据. * 定义js回调java函数. // 绑定键盘的向上,向下按钮事件触发相应的js事件.

JSON发明者,《JS语言精粹》作者Douglas确认QCon北京演讲内容

- - InfoQ cn
春节将至,当大家忙于总结,忙于年会,忙于展望2013的时候,QCon北京已确认的国际讲师们没有因为中国农历新年而停歇:. Jesse Newland,这位排查12306订票插件拖垮GitHub服务故障的资深运维工程师,确认了他的演讲话题. 他将在主题演讲中与大家分享GitHub的ChatOps运维机器人:.