Introduction to Node.js
Node.js is an open source server-side platform built on Google Chrome's
JavaScript Engine that is the V8 Engine. Developed by Ryan Dahl in 2009, it is
currently on its v0.10.36 version. It runs on various platforms like Windows,
Linux, Unix, Mac OS X etc. It's official documentation states that Node.js was
built "for easily building fast and scalable network applications"
and that it "uses an event-driven, non-blocking I/O model that makes it
lightweight and efficient, perfect for data-intensive real-time applications that
run across distributed devices".
One of the reasons why Node.js became quite popular in such a short
time is because it runs single threaded, non-blocking, asynchronous
programming. It is very much memory efficient. When considering PHP (or ASP for
that matter), it handles a file request by first sending the task to the
computer's file system, then waits while the file system opens and reads the
file, afterwards returns the content to the client and only then it is ready to
handle the next request. Whereas Node.js does this process differently due to
its asynchronous property. It sends the task to the computer's file system and
immediately after it is ready to handle the next request. When the file
system has opened and read the file, the server returns the content to the
client.
Not only can Node.js generate dynamic page content, it can also create,
open, read, write, delete as well as close files on the server. It can also
collect form data. But that's not all -- Node.js has the capability of adding,
modifying and even deleting data stored in your database, which has been proven
to be very efficient.
It has been proven time and time again that Node.js is very competent
when it's used in a range of applications such as single page
applications, data streaming applications, I/O bound applications, Data
intensive real-time applications as well as applications that are based on JSON
APIs.

Comments
Post a Comment