-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
TypeScript 5 Design Patterns and Best Practices - Second Edition
By :
When developing applications, you frequently design and manage objects. You create them dynamically or assign them to variables for later use. If left unchecked, this can lead to brittle code due to numerous alternative ways of object creation or improper management of their lifetime, resulting in memory leaks.
The first and most fundamental category of patterns we’ll explore in this book is creational design patterns.
You’ll start by learning how the Singleton pattern ensures that only one instance of an object is maintained throughout a program’s lifetime. Then, we’ll cover the Prototype pattern, which will teach you how to copy existing objects without recreating them from scratch.
Using the Builder pattern, you’ll understand how to streamline the construction of complex objects by breaking down the construction flow into a more readable representation.
Next, you’ll learn how the Factory Method pattern...