About Node.js Oct28


Artigos Relacionados

Share This

About Node.js


What’s Node.js ?

  • It’s Javascript code running on backend servers.
  • Uses V8/Chakra as default Javascript VM.
  • Node.js offers a set of features to develop server side applications, as Asynchronous APIs and so on.

Why Node.js? (+):

  • It comes with a lot helpfull and free built-in modules.
  • Uses the reliable package manager NPM, combined with CommonJS require function to easely manage and resolve dependencies.
  • Asynchronous by nature leveraged by non-blocking IO, makes your life a lot easier when performing async operations. HTTP, HTTP2, HTTPS operations, or IO operations, like reading and writing files are async my nature and don’t consume the main thread.
  • Allow calls to C++ code.
  • Offers a debugger to inspect your code at runtime.
  • Allow you to use the same language: Javascript, in both back and front end, and doing so leverage the real power of ‘full stack’ because makes easy to teams to share responsabilities.

Why not? (-):

  • Changes constantly and breaks backward compability.
  • Dispose of non-blocking nature, it’s single thread and isn’t not suitable for performing long-running calculations. Heavy computations block the incoming requests, which can lead to decrease of performance .
  • So many options of libraries to choose, and some of then still imature and lacking of documentation;
  • Event drive way of thinking don’t present a easy learning curve.