Node.JS Guidebook
eBook - ePub

Node.JS Guidebook

Comprehensive guide to learn Node.js

Dhruti Shah

Condividi libro
  1. English
  2. ePUB (disponibile sull'app)
  3. Disponibile su iOS e Android
eBook - ePub

Node.JS Guidebook

Comprehensive guide to learn Node.js

Dhruti Shah

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Develop attractive and efficient dynamic web applications using Node.js Key Features

  • Assumes a practical approach of learning.
  • Ample of examples are given along with assignments.
  • Book covers a wide range of topics in Node.js, emphasising on real-world.
  • Simple language is used with clear presentation of topics including Node.js modules, npm, event handling.


Description
The Node.js Guidebook is written and designed keeping in mind readers of varies technical and academic inclinations. Every concept has been explained in detail with appropriate examples and demonstrations with images as applicable. Topics have been aligned from simple to complex for the benefit of a beginner in understanding the technology. The logic of all codes in the examples have been explained appropriately. Concepts have been described in a simple language for easy understanding along with real-world applications of the same.Node.js Guidebook aims to introduce readers to the world of Node.js. Node.js is an open source JavaScript run-time environment that executes JavaScript on server-side. Earlier, JavaScript was used only for client-side scripting, but Node.js supports the creation of dynamic Web applications by using JavaScript for server-side scripting. Node.js has taken the world by a storm by simplifying Web application development thorough the use of readily available and pluggable modules, thus, reducing the overall development time. Whether you are a beginner or an experienced developer, you can learn to design and develop attractive and efficient Web applications using Node.js. What Will You Learn
This book will help developers to easily develop attractive and efficient dynamic web applications using Node.js. It will be a great source of reference for developers for migrating applications to open source technologies such as HTML5, Node.js, and MySQL. Who This Book Is For
This book will prove to be a "must have" for beginners as well as experienced professionals as it is a stepping stone for learning new technology. Table of Contents
1. Introduction to Node.js
2. Modules in Node.js
3. File system module
4. NPM in node.js
5. Event handling in Node.js
6. Node.js with MySQL
7. Express and Node.js About the Author
Dhruti Shah is a multi-skilled, tech savvy person with more than 12 years of experience as a software trainer, technical writer, project lead and manager in the field of education and training in Information Technology. She holds a Master of Computer Applications (MCA) degree from South Gujarat University. She is a Microsoft Certified Training Specialist and has trained more than 2000 candidates world-wide on more than 10 technologies. With a keen sense of technological advancement, she has self-acquired working knowledge of several technologies including Java, .NET, PHP, Linux, SQL Server, MySQL, Node.js and so on. She has authored books on these technologies for educational institutions and also conducted webinars on technical subjects for international clients like Nigeria, Vietnam, and Trinidad. She has been appreciated as a model representative for India for flawlessly managing two prestigious International projects to set up and upgrade the Centre of Excellence in Information Technology in Panama and Costa Rica, Central America (a collaboration project of Indian government with the governments of Panama and Costa Rica).

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Node.JS Guidebook è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Node.JS Guidebook di Dhruti Shah in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in JavaScript. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9789387284432

SECTION 1

■ ■ ■

Introduction to Node.js

Session Objectives

  • Understand the concept behind Node.js.
  • Understand the features of Node.js.
  • Learn to work with Node.js REPL terminal.
  • Learn to use Node.js with Command Line Interface.
  • Learn to use Node.js with an Integrated Development Environment (IDE).
  • Compare Node.js with other JavaScript based technologies.

1.1 Introduction

Node.js is an open-source framework based on JavaScript. It was developed by Ryan Dahl in 2009. It is designed from the JavaScript V8 Engine of Google Chrome. Node.js was released under the MIT Licence. It is freely available and its codes are written in JavaScript that work on several platforms such as Windows, Mac OS X, Linux, etc.
[Note: Massachusetts Institute of Technology (MIT) License is a permissive free software license. It puts very limited restrictions on reuse and also provides better license compatibility.]
Normally, JavaScript only runs in the browser but cannot run on the machine. Node.js allows the JavaScript to run on the machine. This allows access to the file system and listen to network traffic on the machine. Also, it can handle HTTP requests like a Web server and send back responses including files. It can directly access databases from JavaScript. In short, anything which can be done with PHP or ASP can now be done by using JavaScript. That is, Node.js uses JavaScript on the server.

1.1.1 Features and Benefits of Node.js

  1. It provides a cross-platform runtime environment as well as a JavaScript library.
  2. It is lightweight and very useful for data-intensive applications that work real-time and across several devices. This is because, Node.js uses an event-driven, single-threaded, non-blocking I/O model which is very memory efficient.
  3. It uses asynchronous programming methodology in which the server does not have to wait for the first request to complete in order to handle another request.
  4. Node.js library executes the code very quickly as it is built on the V8 JavaScript Engine of Google Chrome
  5. Unlike other servers, Node.js does not support buffering of data. The data is displayed in chunks.
  6. Node.js can read, write, create, open and close files on a server.
  7. It can also create, add, update, and delete data from databases.
  8. Node.js can generate dynamic page content and collect form data from a Web page
  9. Node.js uses a single-thread model with event looping so that the applications work in a non-blocking manner and become highly scalable. Due to event-looping mechanism, a single thread can handle more number of requests as compared to existing servers such as HTTP server, Apache server, etc.
[Note: Scalability of an application is measured on the basis of the number of user requests a server can handle. Highly scalable application means it can handle lot of user requests at a time]
Following figure depicts some important parts of Node.js:
Figure 1.1: Parts of Node.js

1.1.2 Types of Applications that can be Developed Using Node.js

Node.js can be used to develop a variety of applications including:
  • Web and networking applications.
  • Video streaming sites which are I/O intensive Web applications.
  • Single-page applications.
  • Data Intensive Real-time Applications (DIRT).
  • JSON APIs based Applications.

1.1.3 Asynchronous Programming with Node.js

Normally, when a request is sent to a Web server for fetching data or files, technologies such as PHP or ASP would handle it by sending the request to the server. However, until the server does not open, read and return the data or file content to the client, it cannot handle another request. Only after the first request is completed, the next request is addressed.
However, Node.js follows the asynchronous methodology. Here, the request is sent to the server or the computer’s file system first. While the server opens, reads and returns the data to the client, at the same time the next request is handled by Node.js. In short, the waiting time is eliminated and the application can serve multiple requests at a time.

1.2 Set up the Node.js Environment

For using Node.js, download and install the latest version of Node.js from the official page https://nodejs.org
To install Node.js, double-click the Windows Installer MSI file and follow the instructions of...

Indice dei contenuti