My Account Log in

1 option

Typescript 4 design patterns and best practices : discover effective techniques and design patterns for every programming task / Theo Despoudis.

Ebook Central College Complete Available online

View online
Format:
Book
Author/Creator:
Despoudis, Theo, author.
Language:
English
Subjects (All):
TypeScript (Computer program language).
Physical Description:
1 online resource (350 pages)
Place of Publication:
Birmingham ; Mumbai : Packt Publishing, [2021]
Biography/History:
Despoudis Theofanis: Theo Despoudis lives in Ireland, where he works as a Software Engineer for WP Engine and as a part-time tech practitioner for Fixate. He is the co-author of The React Workshop and Advanced Go Programming in 7 Days, Dzone Core Member, and maintains some open source projects on GitHub. Theo is available for conference talks, independent consulting, and corporate training services opportunities.
Summary:
A detailed and easy-to-follow guide to help you improve your TypeScript development skills and enable you to solve application design problems using modern practicesKey FeaturesIdentify common gotchas and antipatterns when developing TypeScript applications and understand how to avoid themDiscover expert techniques and best practices in developing large-scale TypeScript applicationsExplore advanced design patterns taken from functional programming and reactive programmingBook DescriptionDesign patterns are critical armor for every developer to build maintainable apps. TypeScript 4 Design Patterns and Best Practices is a one-stop guide to help you learn design patterns and practices to develop scalable TypeScript applications. It will also serve as handy documentation for future maintainers. This book takes a hands-on approach to help you get up and running with the implementation of TypeScript design patterns and associated methodologies for writing testable code. You'll start by exploring the practical aspects of TypeScript 4 and its new features. The book will then take you through the traditional gang of four (GOF) design patterns in their classic and alternative form and show you how to use them in real-world development projects. Once you've got to grips with traditional design patterns, you'll advance to learning about their functional programming and reactive programming counterparts and how to couple them to deliver better and more idiomatic TypeScript code. By the end of this TypeScript book, you'll be able to efficiently recognize when and how to use the right design patterns in any practical use case and gain the confidence to work on scalable and maintainable TypeScript projects of any size.What you will learnUnderstand the role of design patterns and their significanceExplore all significant design patterns within the context of TypeScriptAnalyze, and develop classical design patterns in TypeScriptFind out how design patterns differ from design conceptsUnderstand how to put the principles of design patterns into practiceDiscover additional patterns that stem from functional and reactive programmingWho this book is forIf you're a TypeScript developer looking to learn how to apply established design patterns to solve common programming problems instead of reinventing solutions, you'll find this book useful. You're not expected to have prior knowledge of design patterns. Basic TypeScript knowledge is all you need to get started with this book.
Contents:
Cover
Title Page
Copyright and Credits
Dedication
Contributors
Table of Contents
Preface
Section 1: Getting Started with TypeScript 4
Chapter 1: Getting Started with Typescript 4
Technical requirements
Introducing TypeScript 4
Working with input and output
Useful TypeScript 4 features
Understanding TypeScript and JavaScript's relationship
How does JavaScript compare to TypeScript?
Transitioning from JavaScript to TypeScript
Design patterns in JavaScript
Installing and using the code examples
Reviewing the libraries included in the code examples
Understanding the tsconfig.json file
Running the unit tests
Using VSCode with TypeScript
Using VSCode for this book's code
Inspecting types
Refactoring with VSCode
Introducing Unified Modeling Language (UML)
What is UML?
Learning UML class diagrams
Summary
Q &amp
A
Further reading
Chapter 2: TypeScript Core Principles
Working with advanced types
Using utility types
Using advanced types and assertions
OOP with TypeScript
Abstraction
Inheritance
Encapsulation
Polymorphism
Developing in the browser
Understanding the DOM
Using TypeScript with webpack
Using React
Developing in the server
Understanding the server environment
Using Express with TypeScript
Introducing design patterns in TypeScript
Why design patterns exist
Design patterns in TypeScript
Q&amp
Section 2: Core Design Patterns and Concepts
Chapter 3: Creational Design Patterns
Creational design patterns
Singleton pattern
When do we use the Singleton?
UML class diagram
Classic implementation
Modern implementations
Variants
Testing
Criticisms of the singleton
Real-world examples.
Prototype pattern
When do we use the Prototype pattern?
Criticisms of the Prototype pattern
Real-world examples
Builder pattern
When do we use Builder?
UML class diagram for Builder
Criticisms of Builder
Factory method pattern
When do we use the Factory method?
Alternative implementations
Abstract Factory pattern
When do we use the Abstract Factory?
Criticisms of Abstract Factory
Real-world example
Chapter 4: Structural Design Patterns
Understanding structural design patterns
Adapter pattern
When to use Adapter
Criticisms of Adapter
Real-world use cases
Decorator pattern
When to use Decorator
Modern variants
Criticisms of Decorator
Façade pattern
When to use Façade
Criticisms of Façade
Composite pattern
When to use Composite
Criticisms of Composite
Proxy pattern
When to use Proxy
Modern variant
Criticisms of Proxy
Bridge pattern
When to use Bridge
Criticisms of Bridge
Flyweight pattern
When to use Flyweight
UML class diagram.
Classic implementation
Criticisms of Flyweight
Chapter 5: Behavioral Design Patterns
Behavioral design patterns
The Strategy pattern?
When to use the Strategy pattern
Criticism of this pattern
Chain of Responsibility
When to use Chain of Responsibility?
Criticisms of this pattern
Real-world use case
The Command pattern
When to use the Command pattern?
The Iterator pattern
When to use the Iterator pattern?
The Mediator pattern
When to use the Meditator pattern?
The Observer pattern
When to use the Observer pattern?
The Memento pattern
When to use the Memento pattern?
The State pattern
When to use the State pattern?
The Template method pattern
When to use the Template method pattern?
The Visitor pattern
When to use the Visitor pattern?
Section 3: Advanced Concepts and Best Practices
Chapter 6: Functional Programming with TypeScript
Learning key concepts in functional programming
Pure functions
Recursion
Functions as first-class citizens
Function composition
Referential transparency
Immutability
Understanding functional lenses
Implementation of lenses
Use cases of lenses
Understanding transducers
Understanding monads
Chapter 7: Reactive Programming with TypeScript
Learning Reactive programming concepts
The asynchronous propagation of changes
The pull pattern
The push pattern
The push-pull pattern
Understanding Promises and Futures
Futures
Learning observables
Getting started with ReactiveX observables
Composable operators
Cold versus hot observables
Chapter 8: Developing Modern and Robust TypeScript Applications
Combining patterns
Singleton
Iterator
Command
Using domain-driven design
Understanding entities
Understanding value objects
Understanding domain events
Applying the SOLID principles
Understanding the single-responsibility principle
Understanding the open-closed principle
Understanding the Liskov substitution principle
Understanding the interface segregation principle
Understanding the dependency inversion principle
Is using SOLID a best practice?
Chapter 9: Anti-Patterns and Workarounds
Class overuse
Not using runtime assertions.
Permissive or incorrect types
Using idiomatic code from other languages
From the Java language
From the Go language
Type inference gotchas
About PACKT
Other Books You May Enjoy
Index.
Notes:
Description based on print version record.
ISBN:
1-80056-541-0
OCLC:
1268133279

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account