Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying TypeScript 5 Design Patterns and Best Practices
  • Table Of Contents Toc
  • Feedback & Rating feedback
TypeScript 5 Design Patterns and Best Practices

TypeScript 5 Design Patterns and Best Practices - Second Edition

By : Theofanis Despoudis
5 (1)
close
close
TypeScript 5 Design Patterns and Best Practices

TypeScript 5 Design Patterns and Best Practices

5 (1)
By: Theofanis Despoudis

Overview of this book

Design patterns are the foundation of many world-class software applications, from commercial solutions to open-source projects. This guide equips you with the skills to architect robust, scalable, and maintainable TypeScript 5 applications. Whether you're looking to master modern TypeScript or apply proven software architecture patterns effectively, this book is your go-to resource. Written by Theofanis Despoudis, a recognized TypeScript expert, this second edition is fully updated with TypeScript 5’s latest features, including improved type inference, union enums, and decorators. These updates will help you write cleaner, more maintainable code that adapts to future changes. You’ll dive into classic Gang of Four design patterns through both traditional and modern real-world implementations, gaining hands-on experience with practical applications. You’ll also gain a clear understanding of the power of functional and reactive programming patterns specifically designed for idiomatic TypeScript development. By the end of this book, you’ll be able to identify and apply the right design pattern for any scenario and craft well-structured, maintainable, and testable code.
Table of Contents (17 chapters)
close
close
Lock Free Chapter
1
Part 1:Introduction to TypeScript 5
4
Part 2: TypeScript Core Design Patterns
9
Part 3: Advanced TypeScript Concepts and Best Practices

The Command pattern

The Command pattern is a behavioral design pattern that uses an object to represent actions that work on behalf of the original caller. This pattern provides several benefits:

  • Separation of concerns: It separates the caller of the operation from the actual implementor (aka the code that executes the operation)
  • Extensibility: New commands can be added without changing existing code
  • Queueing and logging: Commands can be queued, logged, or undone easily
  • Parameterization: Objects can be parameterized with different requests

An analogy of this pattern is in a restaurant scenario: The customer (client) creates an order (command). The waiter (invoker) takes the order, and the chef (receiver) prepares the dish according to the order.

When to use the Command pattern

The Command pattern is particularly useful in several scenarios:

  • Decoupling sender and receiver: When you need to distinguish the object that initiates an operation (sender...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
TypeScript 5 Design Patterns and Best Practices
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon