Why to use Nod.Js?
JavaScriptās rising popularity has brought with it a lot of changes, and the face of web development today is dramatically different. The things that we can do on the web nowadays with JavaScript running on the server, as well as in the browser, were hard to imagine just several years ago, or were encapsulated within sandboxed environments like Flash or Java Applets.
Before digging intoĀ Node.js, you might want to read up on the benefits of usingĀ JavaScript across the stackĀ which unifies the language and data format (JSON), allowing you to optimally reuse developer resources. As this is more a benefit of JavaScript than Node.js specifically, we wonāt discuss it much here. But itās a key advantage to incorporating Node in your stack.
AsĀ WikipediaĀ states: āNode.js is a packaged compilation of Googleās V8 JavaScript engine, the libuv platform abstraction layer, and a core library, which is itself primarily written in JavaScript.ā Beyond that, itās worth noting that Ryan Dahl, the creator of Node.js, was aiming to createĀ real-time websites with push capability, āinspired by applications like Gmailā. In Node.js, he gave developers a tool for working in the non-blocking, event-driven I/O paradigm.
In one sentence:Ā Node.jsĀ shines in real-time web applications employing push technology over websockets. What is so revolutionary about that? Well, after over 20 years of stateless-web based on the stateless request-response paradigm, we finally have web applications with real-time, two-way connections, where both the client and server can initiate communication, allowing them to exchange data freely. This is in stark contrast to the typical web response paradigm, where the client always initiates communication. Additionally, itās all based on the open web stack (HTML, CSS and JS) running over the standard port 80.
One might argue that weāve had this for years in the form of Flash and Java Appletsābut in reality, those were just sandboxed environments using the web as a transport protocol to be delivered to the client. Plus, they were run in isolation and often operated over non-standard ports, which may have required extra permissions and such.
With all of its advantages, Node.js now plays a critical role in the technology stack of many high-profile companies who depend on its unique benefits. The Node.js Foundation has consolidated all the best thinking around why enterprises should consider Node.js in a short presentation that can be found on theĀ Node.js Foundationās Case Studies page.
Ā
source:https://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js