Can Node.js replace javascript ?

Node.js is a very powerful JavaScript based framework/platform it allows you to run JavaScript code in the backend, outside a browser built on Google Chrome's JavaScript V8 Engine.

Node.js is a platform built on Chrome's JavaScript runtime for easily developing fast, widely accessible network applications. Node.js makes use of lightweight and efficient coding appropriate for data-intensive real-time applications, I/O intensive web applications like video buffering and streaming sites and other web-based applications that run across distributed devices.

Node.js is free open source and used by several developers around the world. In order to execute the JavaScript you intend to run in the backend, it needs to be interpreted and executed. In simple we can say Node.js is really two things: a runtime environment and a library, which makes use of runtime environment for JavaScript that Google Chrome uses.



Node.js is especially suited for applications where you'd like to maintain a persistent connection from the browser back to the server. Node.js is well suited for applications that have a lot of concurrent connections and each request only needs very few CPU cycles, because the event loop (with all the other clients) is blocked during execution of a function.

Consider this an example of Node.js. One of the client’s needs a simple static HTML website. The website is for selling one item using PayPal the client wants to have a counter which shows the amount of sold items. So we can make increment counter using Node.js frameworks.

The Node.js application was simple to retrieve to get the sold items amount from a Redis database, increment the counter when particular thing is sold and serve the counter value to users via the API.

Some reasons to choose to use Node.js in this case

1.      It is very lightweight and fast. There have been over 200000 visits on this website in three weeks and minimal server resources have been able to handle it all.
2.      Node.js is best suitable for these applications.
3.      The counter is really easy to make to be real time.
4.      Node.js was easy to configure.

5.      There are lots of modules available for free. For example, we can easily find a Node.js module for PayPal.
SHARE

About Janga Reddy

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment