Thursday, 22 January 2015

NodeJs for .Net developers - Introduction

Introduction

Official definition

‘Platform for executing javascript based on non-blocking I/O, event-driven model that enabled fast, scalable network applications’.

Node

Node. Js is a sever side script platform. It was first introduced to the community by Ryan Dahl at 2009. Node is among the most popular project on github. At high level node.js contain three main building blocks
·         libuv  - a high performance, cross-platform evented I.O libraby
·         V8 – google javascript engine
·         Custom c++ and javascript
These three together make node js.

libuv 

libuv is a high performance evented I/O library which provide a library for cross platform non-blocking daemons and language environments.

V8

The v8 JavaScript engine is an open source JavaScript engine developed by google for the google chrome. It has seen use in many other project as well. Node uses v8 as their JavaScript engine
Node.js provides following support for server-side JavaScript for network application.
·         Supports modular JavaScript
·         Encourages non-blocking code(asynchronous)
·         Supports for HTTP, Networking and Web Sockets
·         Node.js is a low-level, fast platform

Installing Nodejs

Open the web browser and type http://nodejs.org/ and click the install button to install nodejs on your machine. Once install nodejs you can go to cmd and verify. Open the CMD and header over to the folder and type the command node
This allows us to write javascript on the cmd like follows

 Next post we will talk about the how to use node with visual studio