وبلاگ بلیان

Mastering MEAN Stack: Build full stack applications using MongoDB, Express.js, Angular, and Node.js.

معرفی کتاب «Mastering MEAN Stack: Build full stack applications using MongoDB, Express.js, Angular, and Node.js.» نوشتهٔ Ashok Chaubal, Pinakin. در سال 2023. این کتاب در فرمت epub، زبان انگلیسی ارائه شده است. «Mastering MEAN Stack: Build full stack applications using MongoDB, Express.js, Angular, and Node.js.» در دستهٔ بدون دسته‌بندی قرار دارد.

A step-by-step guide to building web applications with the MEAN stack KEY FEATURES ● Gain a comprehensive understanding of full stack development and the MEAN stack. ● Implement automated testing using Supertest and JEST for reliable and efficient code testing. ● Understand the importance of deployment with containers. DESCRIPTION The MEAN stack, comprising MongoDB, Express.js, Angular, and Node.js, is a widely used and robust web development framework. Acquiring expertise in the MEAN stack will equip you with the necessary skills to strengthen your web development capabilities, enabling you to build efficient and modern web applications. This book is a comprehensive guide to full stack development using the MEAN stack (MongoDB, Express.js, Angular, and Node.js). It covers all the essential aspects of building robust web applications, from architectural design to implementation. The book introduces the fundamentals of full-stack development and the advantages of using the MEAN stack. It explains the installation and configuration of the MEAN stack components and teaches how to connect them to create powerful full-stack applications seamlessly. The book also covers security mechanisms like authentication and authorization to ensure application security. The book will help you gain proficiency in front-end development with Angular and back-end integration with Node.js. The book also covers real-time data updates using NATS Streaming, automated testing techniques, and the integration of additional services like comments. By the end of the book, you can confidently build full-stack applications using the MEAN stack. WHAT YOU WILL LEARN ● Install and configure the necessary components for building web applications. ● Master frontend development using Angular, including component creation and data binding. ● Discover the power of Node.js and its integration with Angular for efficient backend development. ● Explore the integration of the Comments service and understand the concepts of subdocuments and references. ● Test the integration of the Posts and Comments service, ensuring smooth communication between the two components. WHO THIS BOOK IS FOR Whether you are an absolute beginner or an experienced developer, this book caters to both audiences, providing valuable insights and practical knowledge. TABLE OF CONTENTS 1. Fundamentals of Full Stack Development and the MEAN Stack 2. Architectural Design of Our Sample Application 3. Installing the Components 4. Creation of the Frontend Using Angular 5. Addition of Node.js and Ideas for Integration 6. Handling Authorization 7. Creating the Posts Service and NATS Streaming Integration 8. Introducing Automated Testing 9. Integrating the Comments Service 10. Creating the Comments Service 11. Implementing the Frontend Cover Title Page Copyright Page Dedication Page About the Author About the Reviewer Acknowledgement Preface Table of Contents 1. Fundamentals of Full Stack Development and the MEAN Stack Structure Objectives What is full stack development? Frontend Backend Database Introduction to the MEAN stack Our sample application Introduction to Node.js Introduction to Express.js Introduction to MongoDB Introduction to Angular Introduction to TypeScript and Bootstrap Introduction to TypeScript Introduction to Bootstrap Introduction to Git as a version control system Interaction between components of the MEAN stack Introduction to Docker and Kubernetes as deployment tools Conclusion Questions 2. Architectural Design of Our Sample Application Structure Objectives What are single-page applications? Advantages of SPA Disadvantages of SPA What are multi-page applications? Advantages of multi-page applications Disadvantages of multi-page applications Single-page v/s multi-page applications Common MEAN stack architecture Going with the event-driven approach Best practices for designing an API Working with the singleton pattern Working with the Observer pattern Designing a flexible architecture Differences between the architecture of an application in the dev and prod environment Conclusion Questions 3. Installing the Components Structure Objectives Installing the Node.js runtime Installing the Node.js on Windows Installing the Node.js runtime on macOS Installing the Node.js runtime on Linux Creating the project folder Installing the Angular-CLI Creating a new Angular project Installing Angular Material Verifying that Angular works Exploring the project structure Scanning the package: json file The node_modules folder Looking at the app folder Starting an Angular application Conclusion Questions 4. Creation of the Frontend Using Angular Structure Objectives Understanding the folder structure Working with components General component structure of an Angular app Component structure for our application Creation of Nav Bar component Looking at the nav-bar.component.ts Looking at the nav-bar.component.html Routing in Angular Routing module Few Routing directives The RouterLink directive The RouterLinkActive directive The RouterLinkActiveOptions directive Implementing the Home page Looking at the Home component’s TypeScript code Looking at the Home component’s HTML code Implementing the Register page Looking at the Register component’s TypeScript code Looking at the Register component’s template code Getting input from the user Angular Material Conclusion Questions 5. Addition of Node.js and Ideas for Integration Structure Objectives Understanding an API Verbs used in building REST APIs Creating the posts and comments projects Creating the posts project Creating the comments project Testing of the services Testing the posts service Testing the comments service Ideas of connecting with frontend Conclusion Questions 6. Handling Authorization Structure Objectives Introducing the authentication service Introduction to Google Cloud What is a Kubernetes cluster? Creating a Google Cloud account Creating a new project Setting up a Kubernetes cluster Creating an auth docker build Creating a .dockerignore file Creating an authentication deployment Key elements of a deployment Key elements of a service Introducing MongoDB and creating an auth Mongo deployment Building a user model Creating index.ts Creating an Ingress service yaml Creating an Ingress load balancer Creating a Kubernetes Secret Using Skaffold for build automation Introduction to middleware Introduction to cookies and JSON web tokens Password encryption Error handling using express-validator Understanding an error-handler Understanding the current-user Understanding validate-request.ts Understanding require-auth.ts Creating an abstract class for custom error handling Creating subclasses for validation Understanding request-validation-err.ts Understanding database-connection-err.ts Understanding bad-request-err.ts Understanding not-found-err.ts Understanding no-auth-err.ts Separating the logic for routes Creating Signup, Signin and CurrentUser routes Signup route Signin route CurrentUser route Signout route Testing the application using Postman Conclusion Questions 7. Creating the Posts Service and NATS Streaming Integration Structure Objectives Introducing the common module Creating a GIT repository for the common module Publishing the common module to NPM Installing required packages in the common module Making changes to package.json and tsconfig Making changes to package.json Changes to tsconfig Moving the authentication logic in the common module Installing the common module in the auth folder Standard process for new services The Posts service Creating the Posts folder Updating the index.ts Creating the Posts deployment YAML Creating the Posts Mongo DB deployment YAML Making changes to the Skaffold YAML Looking at the Auth deployment YAML Looking at the Auth index.ts Creating the Posts service Creating a new Post Updating an existing Post Displaying all Posts Displaying a specific Post Creation of the nats-wrapper class Creation of the Posts model Introduction to the NATS streaming server Creating the NATS deployment file Creating a basic publisher and listener ts files The Test Publisher The Test Listener Understanding the BaseListener and PostCreatedListener The base-listener class The post-created-listener class Understanding the BasePublisher, PostCreatedPublisher and PostUpdatedPublisher The base-publisher class The post-created-publisher class The post-updated-publisher class Understanding the PostCreatedEvent and the PostUpdatedEvent The PostCreatedEvent Understanding the PostUpdatedEvent Understanding the subjects enum Updating the common module Testing the publisher and listener Testing out the Posts service using Postman Conclusion Questions 8. Introducing Automated Testing Introduction Structure Objectives Introducing SuperTest Setting up automated testing The index.ts refactor for Auth service Setup for Auth service Designing the tests for the Auth Service Tests for Signup route handler Tests for Signin route handler Tests for current user route handler Tests for Signout route handler Executing the tests for the Auth Service The index.ts refactor for the POST service Setup for the POST service Designing the tests for the Posts Service Tests for createPost route handler Tests for the updatePost route handler Tests for the indexPost route handler Tests for the showPosts route handler Executing the tests for the Posts Service Conclusion Questions 9. Integrating the Comments Service Introduction Structure Objectives Comments service Nesting comments inside posts Pros and cons of nesting Pro Cons What are sub-documents? Pros and cons of sub-documents Pros Cons What are references? Advantages of references Conclusion Questions 10. Creating the Comments Service Structure Objectives Comments service Comments and comments Mongo YAMLs Changes to ingress yaml Duplicating the comments model inside the post Referencing the comments model inside the post model Editing the routes The createPost route The updatePost route Updates to the tests Changes to the createPost test Changes to the updatePost test Executing the tests Conclusion Questions 11. Implementing the Frontend Introduction Structure Objectives What is the App component? Nesting other components inside the app component What are components and services? Components Services Looking at the register component Register.component.html file Register.component.ts file Auth Service Running the app Conclusion Questions Index
دانلود کتاب Mastering MEAN Stack: Build full stack applications using MongoDB, Express.js, Angular, and Node.js.