NODEJS
Node.js was developed by Ryan Dahl in 2009
Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8 Engine).
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Node.js = Runtime Environment + JavaScript Library
Node.js is an open source, cross-platform runtime environment for developing server-side and networking applications.
Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux.
Node.js also provides a rich library of various JavaScript modules which simplifies the development of web applications
Use Node.js for:
1) I/O bound Applications
2) Data Streaming Applications
3) Data Intensive Real-time Applications (DIRT)
4) JSON APIs based Applications
5) Single Page Applications
Not to Use Node.js for CPU intensive applications.
1) I/O bound Applications
2) Data Streaming Applications
3) Data Intensive Real-time Applications (DIRT)
4) JSON APIs based Applications
5) Single Page Applications
Not to Use Node.js for CPU intensive applications.
1) an open source server environment
2) uses JavaScript on the server
3) runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
4) uses asynchronous programming.
5) eliminates the waiting, and simply continues with the next request.
6) runs single-threaded, non-blocking, asynchronous programming, which is very memory efficient.
Node.js can
1) collect form data
2) generate dynamic page content
3) create, open, read, write, delete, and close files on the server
4) add, delete, modify data in your database
Node.js file:
1) contain tasks that will be executed on certain events
2) A typical event is someone trying to access a port on the server
3) Node.js files must be initiated on the server before having any effect
2) A typical event is someone trying to access a port on the server
3) Node.js files must be initiated on the server before having any effect
Node.js has a set of built-in modules.
To import, use the require() function with the name of the module:
eg: http module as, var http = require('http');
Comments
Post a Comment