mehedi369 / node

Learning Node and making wiki for Node.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node

Learning Node and making wiki for Node.

  1. What is node.js?

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Chrome's V8 engine is written in c++. So, node.js helps us to write javascript on the browser and also in the console or terminal. Now, we have the ability to make a server and run it from the terminal using node.js which is much flexible and easy and also there are a lot of JavaScript developer's are available for helping out on any kind of problem.

  1. What is the difference between javascript and node.js?

There is no enough difference between the node.js and JavaScript. It is basically helps us to write javascript on server. The creator of node.js adopt JavaScript syntax to write server side program. In front-end development we mainly write JavaScript for the browser's only but with the help of the node.js we can now create server applications which have the ability to mess with the file system. In browser we have the objects like "window" and "document" but in node we have the same things that names as "global" and "process".

  1. Why node.js is so popular?

Node.js is so popular because of it's event-driven functionality. You know what everything is a event like a mousePressed, input, close, open, read, write etc. So, being a event driven system node is so, popular. Node also use non-blocking I/O(Input/Output) which is pretty nice feature. Node package eco system which is npm(node package module) is one of the largest ecosystem of open source libraries in the world.The community is awesome and the brilliant developers makes module's for the node module.

. Blocking or synchronous > It is just a mode that have the features like when i am in blocking mode i can complete only one task/work until the task is finished. Suppose mobile phone call and also messaging system.

. Blocking or asynchronous > It is just a mode that have the features like when i am in non-blocking mode i can complete tasks/works that is ready for me. Suppose, my application need to fetch data or information from the database and i also need to add two number so, in non-blocking mode i can add two number before the fetch completion from the database and also my program can complete other several task that is available or need not to complete in much period of time.So, it helps us to complete more than one operation in a single period of time and also helps programs to complete the the small or non-I/O operations.Node is also single treated which means we need not to waste a vast amount of cpu or ram usages.


About

Learning Node and making wiki for Node.

License:MIT License


Languages

Language:JavaScript 100.0%