Book Image

Mastering TypeScript 3 - Third Edition

By : Nathan Rozentals
Book Image

Mastering TypeScript 3 - Third Edition

By: Nathan Rozentals

Overview of this book

TypeScript is both a language and a set of tools to generate JavaScript. It was designed by Anders Hejlsberg at Microsoft to help developers write enterprise-scale JavaScript. Starting with an introduction to the TypeScript language, before moving on to basic concepts, each section builds on previous knowledge in an incremental and easy-to-understand way. Advanced and powerful language features are all covered, including asynchronous programming techniques, decorators, and generics. This book explores many modern JavaScript and TypeScript frameworks side by side in order for the reader to learn their respective strengths and weaknesses. It will also thoroughly explore unit and integration testing for each framework. Best-of-breed applications utilize well-known design patterns in order to be scalable, maintainable, and testable. This book explores some of these object-oriented techniques and patterns, and shows real-world implementations. By the end of the book, you will have built a comprehensive, end-to-end web application to show how TypeScript language features, design patterns, and industry best practices can be brought together in a real-world scenario.
Table of Contents (16 chapters)
Free Chapter
1
TypeScript Tools and Framework Options

Summary

If we look back at the work we have done in this chapter on the sample application, we will notice that the architecture used is of sound quality. Our application is made up of a number of independent components. Each of these components conform to the Single Responsibility design principle and are dedicated to only one area of responsibility. We have created display components that are responsible for displaying a single area of the application screen real estate. We have also used the Domain Events design pattern to react to events within our application. One component may raise an event, but another component may be interested in this event. We are also using the State and Mediator design pattern to control the animation and display of the various elements of our screen real estate.

We have also discussed the use of various Observable techniques to help with the asynchronous...