Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side. So what will you be using Node.js, or simply Node, how is called by many, for? Node is a server-side solution for receiving and responding to HTTP requests.
Node is based on `Chrome’s V8 engine and gives you the possibility to write servers using JavaScript with an incredible performance.
Node runs on JavaScript, but itself isn’t JavaScript. Node is a C program. A language that is capable of doing the grunt work and heavy lifting required for networking. JavaScript is used for sending instructions to a C program, that will carry the information in the deepest corners of your operating system. JavaScript is much more accessible than C, that’s why it’s used as the messenger.
So what does that mean? it means you can write a server in JavaScript, without having to worry about learning C.
How did it all start?
About thirteen years after the introduction of the first server-side JavaScript environment, in 2009 Ryan Dahl wrote the first version of Node.js. It was only supported on Linux and Mac OS X. Frustrated by the slow speed and limited possibilities of Apache HTTP Server, which was the most popular back then, Dahl was inspired to write Node.js. And it’s vety good that he did. In a fast developing world, saving time is one of the most valuable assets that you can have.
A year later, in 2010 he came up with a package manager, called npm, that makes it easier for programmers to publish and share source code of Node.js libraries. It was designed to simplify the installation, uninstallation and the update of libraries.
Being sponsored by Joyent, Dahl released a version for Windows together with Microsoft in June of 2011. The first Node.js build supporting Windows was released a month later. Since then it has beenused extensively by companies and developers around the world.
What Can Node.js Do?
- Node.js can generate dynamic page content
- Node.js can create, open, read, write, delete, and close files on the server
- Node.js can collect form data
- Node.js can add, delete, modify data in your database
Node can also eliminate the waiting when the file system has opened and read the file. The node server returns the content to the client and simply continues with the next request. Php and ASP, on the other hand perform differently. They send the task to the computer’s file system, they wait while the file system opens and reads the file and only after the content is returned to the client they are ready to handle the next request.
Who Uses Node.js?
The fact that Node is used by a multitude of large companies should be a statement in itself. Companies like eBay, GoDaddy, Microsoft, PayPal, IBM, Uber, Netflix, PayPal, Yahoo!, Walmart, CIsco and General Electric believe in node’s power and efficiency.
Extremely fast, open source, and built on JavaScript make it very accessible to the web development community. People have built thousands of open-source libraries for Node.js - most of them hosted on the npm website.
The open-source community has developed server frameworks like: Connect, Express.js, Socket.IO, Koa.js, Hapi.js, Sails.js, Meteor, Derby, and many others, to accelerate the development of applications.
In conclusion, if it’s speed that you want, you should definitely choose Node.js for your web server. You can create applications that maintain a persistent connection from the browser to the server, like a browser-chat application that takes almost no system resources.
Sources:
https://www.tutorialspoint.com/nodejs/nodejs_introduction.htm
https://en.wikipedia.org/wiki/Node.js
0 Comments
Leave a Reply
Your email address will not be published. Required fields are marked *