Book description
Leverage the features of TypeScript to boost your development skills and create captivating applications
About This Book
Learn how to develop modular, scalable, maintainable, and adaptable web applications by taking advantage of TypeScript
Explore techniques to use TypeScript alongside other leading tools such as Angular 2, React, and Node.js
Focusing on design patterns in TypeScript, this step-by-step guide demonstrates all the important design patterns in practice
Who This Book Is For
This Learning Path is for intermediate-level JavaScript developers who want to use TypeScript to build beautiful web applications and fun projects. No prior knowledge of TypeScript is required, but a basic understanding of jQuery is expected. This Learning Path is also for experienced TypeScript developers who want to take their skills to the next level, and also for web developers who wish to make the most of TypeScript.
What You Will Learn
Understand the key TypeScript language features and runtime
Install and configure the necessary tools in order to start developing an application
Create object-oriented code that adheres to the SOLID principles
Develop robust applications with testing (Mocha, Chai, and SinonJS)
Apply GoF patterns in an application with a testing approach
Identify the challenges when developing an application
Migrate JavaScript codebases to TypeScript to improve your workflow
Utilize System.JS and Webpack to load scripts and their dependencies
Develop high performance server-side applications to run within Node.js
In Detail
TypeScript is an open source and cross-platform typed superset of JavaScript that compiles to plain JavaScript that runs in any browser or any host. TypeScript adds optional static types, classes, and modules to JavaScript, to enable great tooling and better structuring of large JavaScript applications. Through this three-module learning path, you’ll learn the ins-and-outs of TypeScript for building more robust software.
The first module gets you started with TypeScript and helps you understand the basics of TypeScript and automation tools. Get a detailed description of function, generics, callbacks, and promises, and discover the object-oriented features and memory management functionality of TypeScript.
The next module 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. You will be introduced to low-level programming concepts to help you write TypeScript code, as well as working with software architecture, best practices, and design aspects.
The final module will help you build a complete single page app with Angular 2, create a neat mobile app using NativeScript, and even build a Pac Man game with TypeScript. As if the fun wasn't enough, you'll also find out how to migrate your legacy codebase from JavaScript to TypeScript.
By the end of this Learning Path, you will be able to take your skills up a notch and develop full-fledged web applications using the latest features of the TypeScript.
This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:
Learning TypeScript by Remo H. Jansen
TypeScript Design Patterns by Vilic Vane
TypeScript Blueprints by Ivo Gabe de Wolff
Style and approach
This is a step-by-step, practical guide covering the fundamentals of TypeScript with practical examples. The end-to-end projects included in this book will give you ready-to-implement solutions for your business scenario, showcasing the depth and robustness of TypeScript.
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.
Table of contents
-
TypeScript: Modern JavaScript Development
- Table of Contents
- TypeScript: Modern JavaScript Development
- TypeScript: Modern JavaScript Development
- Credits
- Preface
-
1. Module 1
-
1. Introducing TypeScript
- The TypeScript architecture
-
TypeScript language features
- Types
- Variables, basic types, and operators
-
Flow control statements
- The single-selection structure (if)
- The double-selection structure (if…else)
- The inline ternary operator (?)
- The multiple-selection structure (switch)
- The expression is tested at the top of the loop (while)
- The expression is tested at the bottom of the loop (do…while)
- Iterate on each object's properties (for…in)
- Counter controlled repetition (for)
- Functions
- Classes
- Interfaces
- Namespaces
- Putting everything together
- Summary
- 2. Automating Your Development Workflow
-
3. Working with Functions
-
Working with functions in TypeScript
- Function declarations and function expressions
- Function types
- Functions with optional parameters
- Functions with default parameters
- Functions with rest parameters
- Function overloading
- Specialized overloading signatures
- Function scope
- Immediately invoked functions
- Generics
- Tag functions and tagged templates
- Asynchronous programming in TypeScript
- Summary
-
Working with functions in TypeScript
- 4. Object-Oriented Programming with TypeScript
- 5. Runtime
- 6. Application Performance
- 7. Application Testing
- 8. Decorators
- 9. Application Architecture
-
10. Putting Everything Together
- Prerequisites
- The application's requirements
- The application's data
- The application's architecture
- The application's file structure
- Configuring the automated build
- The application's layout
- Implementing the root component
- Implementing the market controller
- Implementing the NASDAQ model
- Implementing the NYSE model
- Implementing the market view
- Implementing the market template
- Implementing the symbol controller
- Implementing the symbol view
- Implementing the chart model
- Implementing the chart view
- Testing the application
- Preparing the application for a production release
- Summary
-
1. Introducing TypeScript
-
2. Module 2
- 1. Tools and Frameworks
- 2. The Challenge of Increasing Complexity
- 3. Creational Design Patterns
- 4. Structural Design Patterns
- 5. Behavioral Design Patterns
- 6. Behavioral Design Patterns: Continuous
- 7. Patterns and Architectures in JavaScript and TypeScript
- 8. SOLID Principles
- 9. The Road to Enterprise Application
-
3. Module 3
- 1. TypeScript 2.0 Fundamentals
- 2. A Weather Forecast Widget with Angular 2
- 3. Note-Taking App with a Server
- 4. Real-Time Chat
- 5. Native QR Scanner App
- 6. Advanced Programming in TypeScript
- 7. Spreadsheet Applications with Functional Programming
- 8. Pac Man in HTML5
- 9. Playing Tic-Tac-Toe against an AI
- 10. Migrate JavaScript to TypeScript
- A. Bibliography
- Index
Product information
- Title: TypeScript: Modern JavaScript Development
- Author(s):
- Release date: December 2016
- Publisher(s): Packt Publishing
- ISBN: 9781787289086
You might also like
book
Introducing Regular Expressions: JavaScript and TypeScript
This book is your easy-to-digest and concise guide to regular expressions in JavaScript, this book teaches …
book
Advanced TypeScript Programming Projects
Gain in-depth knowledge of TypeScript and the latest ECMAScript standards by building robust web applications across …
book
Pro TypeScript
JavaScript is everywhere, both as a pure language and in popular libraries like Angular, jQuery and …
video
Advanced React.js LiveLessons
More Than Four Hours of Video Training Description Advanced React.js LiveLessons looks at the libraries that …