The Beauty of Node.js

by Patrick Niyongabo

Last week was the first week of my Camp Reality Summer Internship at Stone Ward. In only the few days that I have been working here as a web developer intern in the digital department, I have enjoyed the perks that come with that job title. In only a week, I have been introduced to a lot of tools used in the professional web development. My favorite so far have been:

  1. Slack: a real-time messaging, archiving and search tool for teams.
  2. Atom: the free, open-source, hackable text editor developed by Github.
  3. Node.js: a JavaScript runtime built on the Chrome’s V8 engine.

In this post, I will focus on Node.js because I think it is the one I am most excited to learn about, and also because I think it is probably the most revolutionary tool on the list as it can be used to build almost anything from text editors such as Atom to bots like the ones inside the Slack app.

A Brief History of Node.Js

Node.js was created by Ryan Dahl. He was inspired to create Node.js after uploading an image on flickr, and seeing progress bar trying to access the Web server to see how much of the file has been uploaded in order to display the correct info. These repetitive queries made the process slower, and thus prompted him to find a new smarter way for the process, an easier and faster way.

In 2009, while he was working as a freelance programmer in Germany, Ryan Dahl started writing the code for the project that would later become Node.js in using the C programming language. By the end of that same year, he presented about the project at the JSConf, one the biggest annual conferences for the JavaScript community.

In the years that followed, the project started getting attention from the industry. Ryan Dahl was hired by Joyent, and he was given freedom and necessary resources to continue working on the project. This also meant that Joyent was in charge of the project management, and this caused some conflicts among the Node.js community as most users and contributors did not want an open-source project to be managed by a for-profit corporation.

In 2012 Ryan stepped down and ceded the authority to Isaac Schlueter, one of the developers who had worked on the project since 2009. In 2015, the Node.js foundation was created as a first step toward fully open-governance of the project. Since then, the foundation has released a Node.js 4.0 stable version and launched the annual Node.js Interactive conference in in cooperation with The Linux Foundation.

The Beauty of Node.Js

One selling point of Node.js is its ability to run Javascript code outside the realms of the browsers. Node.js interprets Javascript code using Google’s Chrome V8 Javascript engine. Another selling point of Node.js is its scalability. For people or companies running or deploying code on web servers in a ‘non-blocking, event-driven I/O’ fashion. What that really means is that you can use Node.js to handle multiple operations with simultaneous connections in real-time; and the beauty of this is that I/O operations won’t interfere with each other. This has allowed Node.js to become a contender for back-end web development as it is easily scalable, has low latency, and has ton of free open-source packages that are updated on a regular basis.

 

Photo Attribution Source: wyncode.co

 

For more info about how Node.js works, check out this Article by David Suffern or read the Node.js Manual & Documentation.

Patrick Niyongabo