Print

Node.js pushes JavaScript to the server-side



Alex Handy
Email
June 24, 2011 —  (Page 1 of 2)
JavaScript has long held its place as the language of choice for the Web, but it's only recently become fashionable to run it on the server-side. While Sun Microsystems and others mumbled about server-side JavaScript as early as 2006, it is the recent popularity of Node.js that has given the language a foothold on the server. And while Node.js has grown on Unix systems, its creators are now working on bringing it to Windows.

Node.js was created by Ryan Dahl when he was searching for a way to bring event-driven programming to the Web. The project is currently sponsored by hosting company Joyent.

"Ryan is a C developer, and he didn't have any relationship with JavaScript before Node,” said Tom Hughes-Croucher, chief evangelist for Joyent. “He was writing high-performance Web servers in C and C++. He wanted to use this event-driven model more. He saw himself writing the same applications again and again. He played with Twisted, the Python event-driven framework.”

But the existing libraries and languages didn't quite do it for Dahl, said Hughes-Croucher. “The predominant reason is that there is a lot of heritage in server-side programming already, so when he wanted to use some other library, or access a database, or do something that involved input/output, the existing heritage of those languages didn't work very well with an event driven system,” he said.

This is because all the existing libraries were blocking, he said. “The event-driven system requires that it can continue doing other work while it's waiting for a task to be completed. I don't have to wait for the database process to be complete in order to do more work. People had built all this infrastructure that didn't work this way."

The eventual catalyst for Node.js actually came out of Google. The Google Chrome team opened up its own JavaScript runtime, V8, as an open-source project, and this provided the language runtime Dahl needed to build out an event-driven framework.

But Hughes-Croucher calls the creation of Node.js a perfect-storm situation. He said that the release of V8 was only half of the recipe for success. The other half came from the fact that JavaScript was essentially devoid of server-side code. Dahl would have to write the code for handling essentials like TCP/IP and file access.



Related Search Term(s): JavaScript, Node.js

Pages 1 2 


Share this link: http://sdt.bz/35668
 

close
NEXT ARTICLE
WearScript: A JavaScript environment for Google Glass
Open-source WearScript project combines Android wearable development with the learning curve of JavaScript Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
APRIL 2014 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?