Book Image

TypeScript Design Patterns

By : Vilic Vane
Book Image

TypeScript Design Patterns

By: Vilic Vane

Overview of this book

In programming, there are several problems that occur frequently. To solve these problems, there are various repeatable solutions that are known as design patterns. Design patterns are a great way to improve the efficiency of your programs and improve your productivity. This book is a collection of the most important patterns you need to improve your applications’ performance and your productivity. The journey starts by explaining the current challenges when designing and developing an application and how you can solve these challenges by applying the correct design pattern and best practices. Each pattern is accompanied with rich examples that demonstrate the power of patterns for a range of tasks, from building an application to code testing. We’ll introduce low-level programming concepts to help you write TypeScript code, as well as work with software architecture, best practices, and design aspects.
Table of Contents (15 chapters)
TypeScript Design Patterns
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Chapter 7. Patterns and Architectures in JavaScript and TypeScript

In the previous four chapters, we've walked through common and classical design patterns and discussed some of their variants in JavaScript or TypeScript. In this chapter, we'll continue with some architecture and patterns closely related to the language and their common applications. We don't have many pages to expand and certainly cannot cover everything in a single chapter, so please take it as an appetizer and feel free to explore more.

Many topics in this chapter are related to asynchronous programming. We'll start with a web architecture for Node.js that's based on Promise. This is a larger topic that has interesting ideas involved, including abstractions of responses and permissions, as well as error handling tips. Then we'll talk about how to organize modules with ECMAScript (ES) module syntax. And this chapter will end with several useful asynchronous techniques.

Overall, we'll have the following topics covered in...