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”)?
ReadWriteWeb chatted with Javascript developer Guillermo Rauch, co-founder and CTO of LearnBoost in order to get some insights.
ReadWriteWeb: So, what is 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.
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.
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.
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.
ReadWriteWeb: What are the key benefits of Node.js?
Rauch: There are several:
- Fast. Powered by the incredible V8 virtual machine, it makes JavaScript execution extremely fast.
- 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.
- 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.
- 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.
ReadWriteWeb: What are some of its drawbacks – and how do you respond to criticisms about 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.
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.
ReadWriteWeb: So how does this fit into what you’re building at 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.
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.
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 [email protected]!
Thanks, Guillermo!