Preface

Switching to a reactive mindset is one of the biggest challenges when you start learning Reactive programming using RxJS. I believe that the reactive mindset is gradually achieved by learning reactive patterns and comparing the reactive way with the imperative one to distinguish the difference and the benefits.

That's why I wrote this book, which gathers a set of reactive patterns applied in an Angular application. Learning reactive patterns helps with managing your application's data efficiently, writing clean and maintainable code, reacting to user changes faster, and consequently, enhancing the user experience.

So, all that you have to do is get started!

Who this book is for

The book is for Angular developers who want to use RxJS to build reactive web applications. This book assumes beginner-level knowledge of and experience with Angular, RxJS, TypeScript, and functional programming concepts.

What this book covers

Chapter 1, The Power of the Reactive Paradigm, explains the fundamentals of Reactive programming.

Chapter 2, RxJS 7 – The Major Features, focuses on the main improvements of RxJS 7.

Chapter 3, A Walkthrough of the Application, highlights the architecture and requirements of the application that we will be building gradually.

Chapter 4, Fetching Data as Streams, explains the first reactive pattern for fetching data.

Chapter 5, Error Handling, details the error handling strategies and the reactive patterns for handling errors.

Chapter 6, Combining Streams, explains the reactive pattern for combining streams.

Chapter 7, Transforming Streams, explains the reactive pattern for transforming streams.

Chapter 8, Multicasting Essentials, focuses on the multicasting approach essentials.

Chapter 9, Caching Streams, explains the reactive pattern for caching streams.

Chapter 10, Sharing Data between Components, explains the reactive patterns for sharing data between components.

Chapter 11, Bulk Operations, explores the reactive pattern for performing bulk actions.

Chapter 12, Processing Real-Time Updates, explores the reactive pattern for consuming real-time updates.

Chapter 13, Testing RxJS Observables, explains the different strategies for testing reactive patterns.

To get the most out of this book

All code examples have been tested using Angular 12 on a Windows operating system. However, it should work with future releases too.

Please make sure you follow the prerequisites at https://angular.io/guide/setup-local. The prerequisites include the environment setup and the technologies needed in order to install and use Angular.

We also used the Bootstrap library to manage the application responsiveness. We used primeng as a library of rich components and RxJS 7 as the reactive library, of course.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Reactive-Patterns-with-RxJS-for-Angular. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781801811514_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "In the try block, you place your risky statements, and inside catch, you handle the possible exceptions."

A block of code is set as follows:

behaviourSubject$.subscribe({

next: (message) => console.log(message),

error: (error) => console.log(error),

complete: () => console.log('Stream Completed'),

});

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

behaviourSubject$.subscribe({

next: (message) => console.log(message),

error: (error) => console.log(error),

complete: () => console.log('Stream Completed'),

});

Any command-line input or output is written as follows:

$ mkdir css

$ cd css

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "Select System info from the Administration panel."

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read Reactive Patterns with RxJS for Angular, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.173.72