Venkata Keerti Kotaru
Building Offline Applications with Angular
Develop Reliable, Performant Web Applications for Desktop and Mobile Platforms
Logo of the publisher
Venkata Keerti Kotaru
Hyderabad, Telangana, India
ISBN 978-1-4842-7929-8 e-ISBN 978-1-4842-7930-4
https://doi.org/10.1007/978-1-4842-7930-4
Venkata Keerti Kotaru 2022
Standard Apress
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
To my family
Introduction
Congratulations on beginning to read a new book. This book will help you learn and build modern web applications with Angular and TypeScript. Even if you are a beginner in JavaScript and Angular technologies, the book provides step-by-step instructions to easily follow along with and build next-generation web applications. It presents you with a consistent use case across the book. You will build a few pages for Web Arcade, an imaginary online arcade.
The book primarily focuses on building an application that is resilient to changes in network connectivity. Traditionally, web applications work well when online, but they can crash badly if the connectivity is lost. A decade ago, most applications operated on wired connections or on relatively stable WiFi networks. Connectivity was not a factor. Today, applications run on a variety of networks with varying connectivity and speed. Users expect data not to be lost while they are on the move switching between networks. The advent of new web technologies allows developers to build applications that provide better user experiences. Through the course of this book, you will learn about these aspects with the help of a single use case, Web Arcade.
The book provides step-by-step instructions to get started with an Angular application and add progressive web app and service worker features, and it explores the different configurations. It helps you learn how to build installable web applications with little effort.
Next, the book provides instructions to cache data in IndexedDB. It details the JavaScript API for creating and managing data in the database running on the browsers client machine. Finally, you will learn how to use Dexie.js, which is a wrapper for the IndexedDB API, to simplify the implementation.
Throughout the chapters in the book, you will work through Web Arcade scenarios, which begin with a simple Angular component for rolling dice. You will see how to build pages that list games, navigate to the details of a game, and add comments on a game. You will learn how to build these pages that work even when network connectivity is lost. You will also build features that create data offline. For example, users will be able to add comments while offline and synchronize once the connectivity is restored.
We are glad you picked up this book. Happy learning.
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at https://github.com/Apress/Building-Offline-Applications-with-Angular/upload. For more detailed information, please visit http://www.apress.com/source-code.
Table of Contents
About the Author
Venkata Keerti Kotaru
has been in software development for almost two decades. He has helped design and develop scalable, performant, modern software solutions for multiple clients. He holds a masters degree in software systems from the University of St. Thomas, Minneapolis and St. Paul, USA.
He is the author of several books on Angular, and he also contributes to the developer community by blogging, writing articles, and speaking at technology events. He has written for Dotnet Curry (DNC Magazine). He has presented technology sessions at AngularJS Hyderabad, AngularJS Chicago, and Google Developer Groups at Hyderabad including the annual event Dev Fest. He is a three-time Microsoft MVP.
About the Technical Reviewer
Yogendra Sharma
is a developer with experience in the architecture, design, and development of scalable and distributed applications, with a core interest in microservices and DevOps. Currently he works as a technical architect at Intelizign Engineering Services Pvt Pune. He also has hands-on experience in technologies such as AR/VR, CAD CAM, simulation, AWS, IoT, Python, J2SE, J2EE, NodeJS, VueJs, Angular, MongoDB, and Docker. He constantly explores technical novelties, and he is open-minded and eager to learn about new technologies and frameworks. He has reviewed several books and video courses published by Packt and Apress.
The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
V. K. Kotaru Building Offline Applications with Angular https://doi.org/10.1007/978-1-4842-7930-4_1
1. Building Modern Web Applications
Venkata Keerti Kotaru
(1)
-, Hyderabad, Telangana, India
Welcome! Congratulations on picking this book to learn how to build offline applications with Angular. This introductory chapter sets the expectations and framework for the book. It provides a brief look at traditional web application development and why creating just another traditional web application is not enough.
Laying the Foundation
This book provides some perspective and elaborates on cutting-edge features like service workers and IndexedDB. It provides step-by-step instructions for creating an Angular application and incrementally adding features to build a sophisticated web application. The book uses an imaginary online gaming system, Web Arcade, to illustrate the techniques. It acts as a use case for building a modern web application that is resilient to network connectivity drops and speed changes.