Author(s): Paul Aluyege
Edition: First
Publisher: Packt
Year: 2019
Language: English
Pages: 362
Preface
Introduction to the MEAN Stack
Introduction
MEAN Architecture Demystification
MEAN Architecture
Express.js
Angular
Node.js
Getting Started with Node
Exercise 1: Creating Our First Node Program
Activity 1: Creating an HTTP Server for a Blogging Application
Understanding Callbacks, Event Loops, and EventEmitters in Node
Callback
Event Loops
EventEmitter
EventEmitter Implementation
The AddListener Method
Trigger Events
Removing Listeners
Some Other Features of EventEmmitter
Understanding Buffers, Streams, and the Filesystem in Node
Buffer
Exercise 2: Creating, Reading, and Writing to a Buffer
Uninitialized Buffers
Some Other Buffer Methods
Streams
Reading Data from Streams
Writing to Streams
Some Other Stream Methods
Filesystems
Some Other Methods in the Filesystems Module
Exercise 3: Reading and Writing Data Using Filesystem Operations
Activity 2: Streaming Data to a File
Summary
Developing RESTful APIs to Perform CRUD Operations
Introduction
Getting Started with RESTful APIs
Node RESTful APIs Design Practice
Getting Started with MongoDB Atlas
Clusters
Exercise 4: Creating a Free-Tier Cluster on MongoDB Atlas
The Native MongoDB Driver and Mongoose (Object Document Mapper)
Using the Native MongoDB Driver
Using Mongoose
Exercise 5: Connecting a Node Application with the MongoDB Native Driver
Exercise 6: Connecting the Node Application with a Third-Party Driver (Mongoose)
Creating and Defining a Schema with Mongoose
Creating Models in Mongoose
Exercise 7: Creating a Database Schema and a Data Model Using Mongoose
Activity 3: Connecting the Node Application to MongoDB Atlas
Getting Started with Express
Routing in Express
Exercise 8: Creating a Route and Exporting the Router Object
Activity 4: Creating Controller for the API
Middleware in Express
Error Handling in Express
The View Template Engine
Exercise 9: Using the Pug (Jade) Template Engine and Implementing Error Handling in the Node Application Using Express
Activity 5: Testing a Fully Functional RESTful API
Summary
Beginning Frontend Development with Angular CLI
Introduction
Getting Started with Angular CLI
The Angular CLI
Installing the Angular CLI
Exercise 10: Creating and Running a New Application on the Angular CLI
Project File Review
Using Components, Directives, Services, and Making HTTP Requests in Angular
Angular Components
Exercise 11: Creating Angular Components
Directives
Exercise 12: Implementing a Structural Directive
Exercise 13: Implementing an Attribute Directive
Data Binding in Angular
Services
Exercise 14: Creating Angular Services Manually
HTTP Requests Using Angular's HttpClient
Working with JSON Data
Type Checking Responses
Error Handling
Activity 6: Designing the Frontend and Components for the Blogging Application
Activity 7: Writing Services and Making HTTP Request Calls to an API
Understanding Angular Forms and Routing
Angular Forms
Template-Driven Forms
Exercise 15: Creating a Form Using the Angular Template-Driven Method
Tracking Control State and Validity
Template Reference Variable
Reactive/Model-Driven Forms
Exercise 16: Creating a Simple Form Application Using the Reactive/Model-Driven Method
Validating Model-Driven Forms
Routing in Angular
Getting Started with the Router
Router Outlets, Links, States, and Events
Router outlet
Router State
Router Events
Activity 8: Creating a Form Application Using the Reactive/Model-Driven Method
Activity 9: Creating and Validating Different Forms Using the Template and Reactive-Driven Method
Activity 10: Implementing a Router for the Blogging Application
Summary
The MEAN Stack Security
Introduction
Node Security and Best Practices
Securing your Node Applications
Node Application Authentication with JWTs
The Structure of a JWT
How JWTs Work
Exercise 17: Creating a Token-Based User Authentication System for a Node Application
Activity 11: Securing the RESTful API
Node Application Authentication with Passport
Getting Started with Passport
Passport's Features
Passport Authentication Strategy
Authenticating Requests with Passport
Exercise 18: Creating a User-Authenticating System in a Node Application Using Passport's LocalStrategy
Implementing Facebook and Twitter Strategies
Creating Routes and Granting Permissions
Exercise 19: Creating a User-Authenticating System in Node Using the Facebook Strategy
Activity 12: Creating a Login Page to Allow Authentication with Twitter Using Passport Strategies
Summary
Angular Declarables, Bootstrapping, and Modularity
Introduction
Using Inbuilt Pipes, Custom Pipes, Custom Directives, and Observables
Angular Pipes
Inbuilt Pipes
Custom Pipes
Custom Directive
Exercise 20: Creating a Custom Structure Directive that Functions as an Inbuilt *nglf
Exercise 21: Creating a Custom Attribute Directive that Underlines Text by Listening to the Mouse Hover Effect
Observables
Creating, Defining, and Subscribing to Observables
The RxJs Library and Observables in Angular
Activity 13: Communicating Between Two Components Using Observable
Angular Bootstrapping and Modularity
Bootstrapping an Angular Application
Angular Modularity
JavaScript Modules and NgModules
NgModules
Feature Modules
Entry Components
Service Provider Scope
Limiting Provider Scope with Components and the Lazy-Loading Module
Exercise 22: Creating a Shared Module for a Custom Attribute Directive
Exercise 23: Creating a Lazy-Loaded Module
Activity 14: Creating a Lazy-Loaded Application
Summary
Testing and Optimizing Angular Applications
Introduction
Angular Animations and the Latest Angular Features
Getting Started with the Animation Module
Animating an Element
Animating Route Transitions
Exercise 24: Creating an Animated Route Transition between Two Pages
Activity 15: Animating the Route Transition Between the Blog Post Page and the View Post Page of the Blogging Application
Other Angular Features
Storing and Defining Constants in Angular
Angular Authentication Guard
Activity 16: Implementing Router Guard, Constant Storage, and Updating the Application Functions of the Blogging Application
Optimizing Angular Applications
Measuring Load Time Performance
Exercise 25: Web Application Performance Analysis Using PageSpeed
Optimizing Angular Application Load Time Performance
Optimizing Angular Application Runtime Performance
Exercise 26: Checking the Change Detection Cycle of an Angular Application
Testing Angular Applications
Getting Started with Unit Testing
Unit Testing a Service
Getting Started with E2E Testing with Protractor
Interacting with Elements
Exercise 27: Performing an E2E Test for a Default Angular CLI Application to Find an Element Using By.CSS
Activity 17: Performing Unit Tests on the App Root Component and Blog‑Post Component
Summary
Appendix
Index
_GoBack
_Hlk532776065
_Hlk532776123
_Hlk532776293
_Hlk532706445
_Hlk532776809
_Hlk532699610
_Hlk532772383
_Hlk532772453
_Hlk532771933
_Hlk532771968
_Hlk532772997
_Hlk533662828
_Hlk533518035
_Hlk533756655
_Hlk533756776
_Hlk533757714
_Hlk533729730
_Hlk533762858
_Hlk533623410
_GoBack
_Hlk534154876
_Hlk534155326
_Hlk534156433
_Hlk535322832
_Hlk534158947
_Hlk534338618
_Hlk534166585
_Hlk533967512
_GoBack
_Hlk534597222
_Hlk534517576
_Hlk534154514
_Hlk534715600
_Hlk535436289
_Hlk535443118
_Hlk535493397
_Hlk535528324
_Hlk535528531
_Hlk535529936
_GoBack
_Hlk536115005
_Hlk531800809
_Hlk530363255
_Hlk530189543
_Hlk531009569
_Hlk536030898
_Hlk531277947
_Hlk532140581
_Hlk533045753
_Hlk530495707
_Hlk533044035
_Hlk533044547
_GoBack
_Hlk534499064
_Hlk534507550
_Hlk534014569
_Hlk534518346
_Hlk534581757
_Hlk535209869