๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Ultimate Node.js for Cross-Platform App Development: Learn to Build Robust, Scalable, and Performant Server-Side JavaScript Applications with Node.js

โœ Scribed by Ramesh Kumar


Publisher
Orange Education Pvt Ltd, AVAโ„ข
Year
2024
Tongue
English
Leaves
409
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Unleash the Power of Node.js for Building Enterprise-Grade, Scalable Server-Side Applications.

Unlock the full potential of Node.js for modern web development with this comprehensive handbook to developing applications and services.

The book will cover the fundamentals to advanced techniques, and explore the intricacies of building powerful applications. You will master Express server creation, develop RESTful APIs with efficient routing, and dive into MongoDB for seamless data persistence.

It will uncover the nuances of template engines, middleware, and robust authentication methods. Leverage Socket.IO for real-time capabilities and adeptly handle errors with effective logging. The projects will double as versatile boilerplates for kickstarting your own development endeavors.

In the later chapter, you will learn Test-Driven Development with Mocha, gain insights into debugging, and perfect the art of building and deploying Node.js applications.

This book is divided into 15 chapters. We will cover most of the Node.js basic concepts and some advanced concepts that are used for developing backend applications.

In Chapter 1, we will learn a few terms and concepts that are crucial to understanding Node.js. Some of the key concepts will include non-blocking events, event loops, asynchronous execution, jะฐvascript runtime environment, REPL, NPM, and so on. This introduction chapter will help in getting started with Nodejs and involve activities like installation, running cli commands, running the first Nodejs program.

In Chapter 2, we will dive deeper and learn about the core built-in modules and underlying features that are responsible for making Node.js a great technology. We will cover some of the core concepts, including Event Loop, Asynchronous programming, Event, and callbacks.

In Chapter 3, we will learn about Express and cover topics like Introduction to Express core concepts, along with installation on local systems. We will also learn how to create our first backend server using express.js which supports routes and middlewares.

In Chapter 4, we're going to take a closer look at the fundamentals of RESTful services and focus on creating some of the backend RESTful APIs and handling different routes. We will learn about request validations and response transformation, which is an important part of building APIs using Node.js.

In Chapter 5, we will learn about the NoSQL database that we can use for a variety of requirements in our application. This chapter will focus on exploring more MongoDB and cover basic things about how to install and use MongoDB as a backend database and perform some basic CRUD operations using Mongo-cli.
...
In Chapter 14, we will discuss topics on performing build and deploying your node application to a server. We will cover how to create and publish our package to the NPM repository so that the module can be used by another team or developer.

In Chapter 15, we will give a walk-through about some of the advanced topics that are not in the scope of this book, such as building highly distributed systems, leveraging messaging systems like Kafka, Multi-Threaded Systems, and so on. tandards Recommendations (PSR) to serve data for your Nuxt app.

Each example in the book adheres to common best practices, providing valuable insights to help you avoid common pitfalls. Designed as both a learning resource and a reference guide, this book equips you with the knowledge to tackle challenging problems at any stage of development.

โœฆ Table of Contents


Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Technical Reviewers
Acknowledgements
Preface
Errata
Table of Contents
1. Getting Started with Node.js
Introduction
Structure
History of Node.js
Defining Node.js
Features of Node.js
Reasons for Node.js Popularity
Node.js versus Browser JavaScript
Installing Node.js
Installing NVM on Windows
Verifying NVM Installation
Some Core Concepts of Node.js
V8 Engine
Blocking versus Non-blocking Operations
Event Loop
Callback functions
Defining Callback Hell in Node.js
Ways to Avoid Callback hell
Promise
Async and Await
Choosing the Appropriate Approach
REPL Console
Getting Started with the REPL
Using NPM and Package.json
Init
Install
Installing Single Package
Update
Attributes of Package.json
The First Console Application Using Node.js
The First Web Application Using Node.js
Conclusion
Further Readings
Test Your Node.js Basic Knowledge
Answers
2. Deep Dive into Node.js
Introduction
Structure
Traditional Web Application Architecture
Architecture of Node.js
Event Loop
Phase Methods in Details
Non-blocking or Asynchronous I/O
Bank and Cafe
Core Node Modules
Buffers
Creating Buffers
Writing Buffers
Reading from Buffers
Converting Buffer to JSON
Concatenating Buffers
Comparing Buffers
Copying Buffer
Events
Emit an event with arguments
Detach an event listener
Extend the EventEmitter class
File System
File Reading
File Open
File Information
HTTP
Path
Process
Stream
Reading from Stream
Writing to Stream
Piping Stream
Chaining Stream
Conclusion
Questions
Answers
3. Introducing Express.js
Introduction
Structure
Express.js Overview
Key Features of Express.js
Benefits of Express.js
Installing Express.js
How Express.js Works
Adding Routes in Express
Request/Response Object
Using Middleware in Express
Application-level middleware
Router-level middleware
Error-handling middleware
Built-in middleware
Third-party middleware
Serving Static Files
Express Application Generator
Conclusion
Questions
Answers
4. Creating REST API and Routing
Introduction
Structure
Introduction to RESTful Services
Benefits of RESTful APIs
Different Kinds of HTTP Verbs
Idempotency of Different HTTP Verbs
How RESTful APIs Work
Creating the First HTTP Server
Adding Routes
Using Swagger with Node.js
Setting up Swagger in Node.js
Request Validations
Validating Request Body
Request Transformation
Response Transformation
Understanding HTTP Status Codes
CORS Request Handling with Express
Configuring CORS with Express
API Error Handling
Conclusion
Further Readings
5. Working with MongoDB
Introduction
Structure
Introducing Database
Use Case of Database
Types of Database
Advantages of Using Databases
Disadvantages of Using Databases
Database Management System (DBMS)
Usage of DBMS
Types of Data Models in DBMS
Advantages of DBMS
Disadvantages of DBMS
ACID Properties in DBMS
Basics of MongoDB
RDBMS versus MongoDB
Key Components of MongoDB Architecture
How MongoDB Works
Features of MongoDB
Advantages of MongoDB
Disadvantages of MongoDB
Installing MongoDB on Windows
Creating our First Connection to MongoDB
Mongo Shell for MongoDB
Installing the Mongo Shell
Connecting to MongoDB Database
Running Mongo Shell Application
Basic Commands for Mongo Shell
Introduction to MongoDB Compass
Installation of Compass on Windows
Conclusion
Further Readings
6. Data Persistence
Introduction
Structure
Understanding ORM Tool
Introduction to Mongoose
Characteristics of Mongoose
Advantages of Mongoose
Disadvantages of Mongoose
Key Terminologies
Schema and Model
Connecting to MongoDB through Mongoose
Database connection
Basic Mongoose Operations
Create operation
Retrieve operation
Update operation
Delete operation
Real-world Example
Conclusion
Further Reading
7. Template Engines
Introduction
Structure
Templating engines
Working of template engines
Advantages of template engines
Disadvantages of template engines
Key components of template engines
HTML rendering with templates
Exploring the EJS template engine
Creating dynamic content using EJS
Conclusion
Further readings
8. Middleware Functions
Introduction
Structure
Introduction to Middleware
Importance of Middleware
Advantages of Using Middleware
Key Components of Middleware
Understanding the Next( ) Function
Using Inbuilt Middleware with Express
Types of Express Middleware
Application-level Middleware
Router-level Middleware
Built-in Middleware
Error Handling with Middleware
Third-party Middleware
List of Third-party Middleware
Creating our First Custom Middleware
Middleware Chaining
Conclusion
Further Readings
9. Authentication and Authorization
Introduction
Structure
Introduction to Authentication and Authorization
Brief about Authentication
Importance of Authentication
Authentication Types
Popular Authentication Techniques
Password-based Authentication
Passwordless Authentication
2FA/MFA
Single Sign-On (SSO)
Social Authentication
Brief about Authorization
Importance of Authorization
Authorization Techniques
Role-based Access Control
JSON Web Token
SAML
OpenID Authorization
OAuth
Difference between Authentication and Authorization
Securing Real-World APIs
Running Application
Conclusion
Further Readings
10. Socket.IO
Introduction
Structure
Exploring WebSocket programming
Introducing WebSocket
Usage of WebSockets
Advantages of WebSocket
Disadvantages of WebSocket
WebSocket versus HTTP
Establishing WebSocket Connections
WebSocket Protocol
Using Socket.IO with Express
Communication between Client and Server
Reasons to Choose Node.js and Socket.IO
Creating a Simple Chat Application
Conclusion
Further Readings
11. Handling and Logging Errors
Introduction
Structure
Defining Errors in JavaScript
Types of Errors
Defining Error Handling in JavaScript
Factors Causing Errors in Node.js
Types of Errors in Node.js
Functional Errors
Programming Errors
Understanding Error Handling in Depth
Error Handling Inside Express
Express.js Default Error Handling
Custom Error Handling
Handling Errors Using Middleware Functions
Adding Multiple Middleware Handlers
Building Express Applications with Error Handling
Logging Errors in Node.js Application
Using Winston Logger
Conclusion
Further Readings
12. TDD with Mocha and Chai
Introduction
Structure
Node.js Unit Testing Concepts
Importance of Unit Testing
Test-Driven Development Fundamentals
Test-Driven Development Workflows
Key Principles of Test-Driven Development
Different Types of Testing Frameworks
Unit Testing key concepts
Advantages of Unit Testing in Node.js
Node.js Unit Test Anatomy
Advantages of using Mocha and Chai
Practical tips for writing unit tests
Methods to write unit tests
Introduction to Behavior-Driven Development (BDD)
BDD and Unit Testing
Key Benefits of BDD
Installation of Mocha and Chai
Hooks used in writing Unit Tests
BeforeEach
AfterEach
Spices
Stubs
Mocks
Async code
Callback and Promise
Conclusion
Further Readings
13. Debugging
Introduction
Structure
Introduction to Debugging
Importance of Debugging
Debugging Strategies
Debugging Techniques
Using Console.log
Using Node Inspector
Using Node.js debug module
Debugging an Express Application
Creating a Node.js application
Installing the Node.js debugger using โ€œNodemonโ€
Start debugging in VS Code
Run the debugger with Breakpoint
Conclusion
Further Readings
14. Build and Deployments
Introduction
Structure
Creating an NPM Package
Initializing Git Repository
Initializing NPM
Creating the First NPM Package
Testing the NPM Package
Running test application
Publishing Your NPM Package
Introduction to Continuous Integration and Continuous Delivery
Defining Continuous Integration (CI)
Defining Continuous Delivery (CD)
Defining Continuous Deployment (CD)
Defining Continuous Testing (CT)
Key elements of CI/CD
Importance of CI/CD
Deployment Service
Deployment pipeline
Advantages of pipeline deployment
Key components of the deployment pipeline
Stages of Deployment Pipeline
Introduction of pipeline tools
Deploying Node.js applications Using Docker
Creating a demo project
Creating Dockerfile
Building the Docker image
Running docker image as a container
Kubernetes Introduction
Key Components of Kubernetes
Kubernetes deployment and services background
Deploying Node.js applications to a Kubernetes cluster
Conclusion
Further Readings
15. Future Scope
Introduction
Structure
Distributed Systems
Centralized systems vs Distributed systems
Key Features of Distributed Architecture
Advantages of distributed systems
Disadvantages of distributed systems
Event-based programming
Building event-driven applications in Node.js
Messaging systems like Kafka
Key concepts of Kafka
Running Kafka locally
Multi-threaded system
Advantages of Multithreading
Running parallel child processes in Node.js
Define Worker Threads
Use of worker threads
Child process example
Conclusion
Further Readings
Index


๐Ÿ“œ SIMILAR VOLUMES


Beginning API Development with Node.js:
โœ Anthony Nandaa ๐Ÿ“‚ Library ๐Ÿ“… 2018 ๐Ÿ› Packt Publishing ๐ŸŒ English

Learn everything you need to get up and running with cutting-edge API development using JavaScript and Node.js; ideal for data-intensive real-time applications that run across multiple platforms. Key Features Build web APIs from start to finish using JavaScript across the development sta

Building Scalable Apps with Redis and No
โœ Johanan Joshua. ๐Ÿ“‚ Library ๐ŸŒ English

Packt Publishing, 2014. โ€” Code only. โ€” ISBN-10: 1783984481, ISBN-13: 978-1-78398-448-0.<div class="bb-sep"></div><strong>ะšะพะด ะฟั€ะธะผะตั€ะพะฒ ะบ ะฒั‹ะปะพะถะตะฝะฝะพะน ะทะดะตััŒ ะบะฝะธะณะต ะฒ ั„ะพั€ะผะฐั‚ะต PDF, EPUB, MOBI, AZW3.</strong><br/> <br/>Node.js is a JavaScript runtime-based, scalable platform used to develop web applications

Building Scalable Web Apps with Node.js
โœ Ravi Kumar Gupta ๐Ÿ“‚ Library ๐Ÿ“… 2024 ๐Ÿ› Orange Education Pvt. Ltd. ๐ŸŒ English

Easy API Design Using Express.js and Node.js (TypeScript) Book Description Embark on a transformative journey into the world of web development with the latest Node.js v20, Express.js frameworks and TypeScript. This comprehensive book empowers developers at all levels, from newcomers to seasoned

Building Scalable Web Apps with Node.js
โœ (Panchal, Yamini, Gupta, Ravi Kumar ๐Ÿ“‚ Library ๐Ÿ“… 2024 ๐Ÿ› Orange Education Pvt. Ltd. ๐ŸŒ English

Easy API Design Using Express.js and Node.js (TypeScript) Book Description Embark on a transformative journey into the world of web development with the latest Node.js v20, Express.js frameworks and TypeScript. This comprehensive book empowers developers at all levels, from newcomers to seasoned

Learning Node.js for Mobile Application
โœ Stefan Buttigieg, Milorad Jevdjenic ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› Packt Publishing ๐ŸŒ English

This book takes a step-wise and incremental approach toward developing cross-platform mobile technologies using existing web technologies. This will allow you to truly understand and become proficient in developing cross-platform mobile applications with Node.js, Ionic Framework, and MongoDB. The b