网站开发人员请留意Node.js

原文链接

http://www.readwriteweb.com/hack/2010/10/why-developers-should-pay-atte.php

 

 

There's a substantial amount of buzz and enthusiasm right now about Node.js. So what is it, and why should you care about it (well, other than "I said so")?

  关于Node.js的传言早已甚嚣尘上。那么Node.js到底是什么呢?为什么你应当关心它呢(这可不是我一个人说的哦!)?

ReadWriteWeb chatted with Javascript developer Guillermo Rauch, co-founder and CTO of LearnBoost in order to get some insights.

读写网为此特地与JavaScript开发人员、LearnBoost的创始人和CTOGuillermo Rauch进行了一次聊天采访以披露一些深刻的见解。

ReadWriteWeb: So, what is Node.js?

读写网:到底Node.js是什么呢?

Rauch: Node.js is a framework for building networked applications in JavaScript outside of the browser. It leverages  V8, the super fast JavaScript engine by Google. JavaScript happens to be a great fit for writing servers due to its event-driven nature. You not only benefit from the speed of V8, but most of the times, the Node.js/JavaScript paradigms make you write code that is fast by design.

Rauch:Node.js是一个在浏览器外部创建互联网应用程序的框架。它使用谷歌开发的超快速JavaScript引擎V8。JavaScript的事件驱动特性使其自然而然地成为了编写服务器的上佳选择。你不仅仅可以从V8的运行速度上获益,Node.js/JavaScript规范还可以让你在根据设计来编写代码时更加迅捷。

ReadWriteWeb: Why should developers care?

读写网:为什么开发者需要关注这一技术呢?

Rauch: First of all, most web developers are already using jQuery, MooTools, or similar frameworks to leverage JavaScript on the browser. That means they'll be instantly familiar with Node.js, even though it's a different environment with unique idioms and constructs.

Rauch:首先,大部分的网站开发人员已经通过jQuery,MooTools或者类似的框架在浏览器上使用JavaScript。这意味着他们对Node.js已经十分熟悉,尽管其开发环境具有独特的风格和结构。

Secondly, thanks to the expressiveness of JavaScript and the concise yet powerful Node.js API, you can build programs that have been typically considered out of reach or too time consuming. The "Hello world" of Node is writing your own HTTP server.

其次,归功于JavaScript的表现力和简明而强大的Node.js API,你可以轻松编写出那些通常无法实现或者太过于耗时的程序。入门的程序就是编写一个你自己的HTTP服务器。

And lastly, you won't be alone. Node.js has already managed to capture the attention of thousands of developers on GitHub, and hundreds of modules are available today. Considering the time it's been around, this is incredibly impressive and in my opinion a testament to the revolution it's starting.

而最后,你不会感到孤独。Node.js已经在GitHub上吸引了几千名开发人员的注意,而现在已经有几千个模块可以被直接引用。考虑一下它出现的时间,这是极其令人震惊的。我甚至认为它即将引发一场革命。

ReadWriteWeb: What are the key benefits of Node.js?

读写网:那么Node.js最大的好处是什么呢?

Rauch: There are several:

Rauch:有好几个:

Fast. Powered by the incredible V8 virtual machine, it makes JavaScript execution extremely fast.

快速:V8虚拟机的支持令JavaScript的运行速度极快。

Fast by design. Most of the applications we're writing today are heavily I/O bound. Because of the event-driven nature of JavaScript (and Node by extension), whatever you write with it is going to be very fast.

快速设计。我们如今编写的大部分应用程序都有严重的输入输出限制。而由于JavaScript的时间驱动特性(和节点扩展),你无论在其中编写什么都十分迅速。

One language to rule them all. Any serious web applications today will definitely require JavaScript expertise already, in order to make the user experience appealing and the application decent by modern standards (as an example, Facebook or the new Twitter are mostly driven by JavaScript for most interactions). Having the ability to write the backend services (and not just the web backend) in the same language is something extremely attractive.

单语言解决一切方案。如今,为了让用户体验更具吸引力和让应用程序更符合现代标准,任何系列的网络编程绝对都需要JavaScript编程(例如,Facebook或者新版的Twitter大部分的交互操作都依靠JavaScript驱动)。而该语言同时具备了编写后台服务器(不仅仅是网站后台)的能力是一件极为引人注目的事情。

A great fit for the realtime web. Since you take control of the web server, Node.js is uniquely suited for the advance of the realtime web.

完美适应实时网站。因为你可以控制网站服务器,Node.js对实时网站的适应程度是独一无二的。

ReadWriteWeb: What are some of its drawbacks - and how do you respond to criticisms about Node.js?

读写网:那么它的缺点呢?你对那些针对Node.js的批判有什么回应吗?

Rauch: It's incomplete. Recently, Ryan [Node.js's original author Ryan Dahl] outlined 9 existing challenges in Node.js at JSConf.eu. As an example, for LearnBoost we had to work around SSL support by offloading it, since Node.js core SSL support is incomplete. Today, Node.js is production ready as long as you know what you're doing.

Rauch:该框架依然有待完善。最近,Ryan(Node.js的原作者Ryan Dahl)在JSConf.eu上提出了Node.js现有的九大挑战。例如,我们的LearnBoost网站需要通过卸载SSL支持的方式来运行,因为Node.js核心对于SSL的支持依然不够完整。如今,你必须在清楚地了解你的需求的情况下使用Node.js这款产品。

This is the only problem I see right now. Aside from that, people have criticized how opinionated it is, they've questioned the effectiveness of event-driven programming for writing servers, or they've stated that writing code with callbacks (the essential construct in this kind of programming) can become troublesome.

这是目前我所看到的唯一问题。在此只外,还是有人们武断地批评它,他们质疑事件驱动编程对于编写服务器不够高效,或者他们指出使用回调(Node.js的核心建立在这种编程方式上)进行编程会造成问题。

ReadWriteWeb: So how does this fit into what you're building at LearnBoost?

读写网:那么你们在建立LearnBoost的过程中它起了很好的作用吗?

Rauch: LearnBoost was founded to revolutionize education through web technologies. We want to produce an unique experience that is faster than anything else out there. We want to make teachers, students and parents interact online in real-time. And we want to iterate on it faster than anyone else. Node.js is the perfect environment to nurture this.

Rauch:LearnBoost致力于通过网页技术来提供革命性教育。我们力图营造目前独一无二的快速用户体验。我们要让教师、学生和家长可以在网上实时进行互动。我们需要不断地让其速度快于其他网站。Node.js是实现这一目标的完美环境。

As a result, we've developed the Socket.IO real-time framework, the MongoDB ORM Mongoose, the automated cloud testing framework Soda and we maintain Express, the most popular web framework.

因此,我们开发了Socket.IO实施框架、Mongo ORM Mongoose、自动云测试框架Soda,同时我们继续保持使用Express这个最流行的网站框架。

If you're interested in pushing the web forward and making profound change in a space as important as education, don't hesitate to email your resumes at guillermo@learnboost.com!

如果你对推进网站技术发展和深度变革教育环境感兴趣,不要犹豫,请将你的简历发到guillermo@learnboost.com!

Thanks, Guillermo!

感谢Guillermo!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值