TypeScript: Modern JavaScript Development

Leverage the features of TypeScript to boost your development skills and create captivating applications
Preview in Mapt

TypeScript: Modern JavaScript Development

Remo H. Jansen, Vilic Vane, Ivo Gabe de Wolff

3 customer reviews
Leverage the features of TypeScript to boost your development skills and create captivating applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$35.00
RRP $69.99
Save 49%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$35.00
$29.99 p/m after trial
RRP $69.99
Subscription
eBook
Start 14 Day Trial

Frequently bought together


TypeScript: Modern JavaScript Development Book Cover
TypeScript: Modern JavaScript Development
$ 69.99
$ 35.00
Cross-platform Desktop Application Development: Electron, Node, NW.js, and React Book Cover
Cross-platform Desktop Application Development: Electron, Node, NW.js, and React
$ 35.99
$ 18.00
Buy 2 for $35.00
Save $70.98
Add to Cart

Book Details

ISBN 139781787289086
Paperback841 pages

Book Description

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:

Table of Contents

Chapter 1: Introducing TypeScript
The TypeScript architecture
TypeScript language features
Putting everything together
Summary
Chapter 2: Automating Your Development Workflow
A modern development workflow
Prerequisites
Source control tools
Package management tools
Task runners
Test runners
Synchronized cross-device testing
Continuous Integration tools
Scaffolding tools
Summary
Chapter 3: Working with Functions
Working with functions in TypeScript
Asynchronous programming in TypeScript
Summary
Chapter 4: Object-Oriented Programming with TypeScript
SOLID principles
Classes
Interfaces
Association, aggregation, and composition
Inheritance
Generic classes
Generic constraints
Applying the SOLID principles
Namespaces
Modules
Circular dependencies
Summary
Chapter 5: Runtime
The environment
The runtime
The this operator
Prototypes
Closures
Summary
Chapter 6: Application Performance
Prerequisites
Performance and resources
Performance metrics
Performance analysis
Performance automation
Exception handling
Summary
Chapter 7: Application Testing
Software testing glossary
Prerequisites
Testing planning and methodologies
Setting up a test infrastructure
Creating test assertions, specs, and suites with Mocha and Chai
Test spies and stubs with Sinon.JS
Creating end-to-end tests with Nightwatch.js
Generating test coverage reports
Summary
Chapter 8: Decorators
Prerequisites
Annotations and decorators
Summary
Chapter 9: Application Architecture
The single-page application architecture
The MV* architecture
Common components and features in the MV* frameworks
Choosing an application framework
Writing an MVC framework from scratch
Summary
Chapter 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
Chapter 11: Tools and Frameworks
Installing the prerequisites
Choosing a handy editor
Getting your hands on the workflow
Summary
Chapter 12: The Challenge of Increasing Complexity
Implementing the basics
Growing features
Getting things right
Summary
Chapter 13: Creational Design Patterns
Factory method
Abstract Factory
Builder
Prototype
Singleton
Summary
Chapter 14: Structural Design Patterns
Composite Pattern
Decorator Pattern
Adapter Pattern
Bridge Pattern
Façade Pattern
Flyweight Pattern
Proxy Pattern
Summary
Chapter 15: Behavioral Design Patterns
Chain of Responsibility Pattern
Command Pattern
Memento Pattern
Iterator Pattern
Mediator Pattern
Summary
Chapter 16: Behavioral Design Patterns: Continuous
Strategy Pattern
State Pattern
Template Method Pattern
Observer Pattern
Visitor Pattern
Summary
Chapter 17: Patterns and Architectures in JavaScript and TypeScript
Promise-based web architecture
Modularizing project
Asynchronous patterns
Summary
Chapter 18: SOLID Principles
Single responsibility principle
Open-closed principle
Liskov substitution principle
Interface segregation principle
Dependency inversion principle
Summary
Chapter 19: The Road to Enterprise Application
Creating an application
Building and testing projects
Version control
Continuous integration
Deployment automation
Summary
Chapter 20: TypeScript 2.0 Fundamentals
What is TypeScript?
Quick example
Learning modern JavaScript
Type checking
Summary
Chapter 21: A Weather Forecast Widget with Angular 2
Using modules
Setting up the project
Creating the first component
Adding conditions to the template
Using the component in other components
Showing a forecast
Creating the forecast component
The main component
Summary
Chapter 22: Note-Taking App with a Server
Setting up the project structure
Getting started with NodeJS
Understanding the structural type system
Adding authentication
Testing the API
Adding CRUD operations
Writing the client side
Running the application
Summary
Chapter 23: Real-Time Chat
Setting up the project
Getting started with React
Writing the server
Connecting to the server
Creating the chat room
Comparing React and Angular
Summary
Chapter 24: Native QR Scanner App
Getting started with NativeScript
Creating the project structure
Creating a Hello World page
Creating the main view
Adding a details view
Scanning QR codes
Adding persistent storage
Styling the app
Comparing NativeScript to alternatives
Summary
Chapter 25: Advanced Programming in TypeScript
Using type guards
More accurate type guards
Checking null and undefined
Creating tagged union types
Comparing performance of algorithms
Summary
Chapter 26: Spreadsheet Applications with Functional Programming
Setting up the project
Functional programming
Using data types for expressions
Parsing an expression
Defining the sheet
Using the Flux architecture
Creating actions
Writing the view
Advantages of Flux
Summary
Chapter 27: Pac Man in HTML5
Setting up the project
Using the HTML5 canvas
Designing the framework
Drawing on the canvas
Adding utility functions
Creating the models
Drawing the view
Handling events
Creating the time handler
Running the game
Adding a menu
Summary
Chapter 28: Playing Tic-Tac-Toe against an AI
Creating the project structure
Adding utility functions
Creating the models
Implementing the AI using Minimax
Creating the interface
Testing the AI
Summary
Chapter 29: Migrate JavaScript to TypeScript
Gradually migrating to TypeScript
Adding TypeScript
Migrating each file
Refactoring the project
Summary

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

Authors

Table of Contents

Chapter 1: Introducing TypeScript
The TypeScript architecture
TypeScript language features
Putting everything together
Summary
Chapter 2: Automating Your Development Workflow
A modern development workflow
Prerequisites
Source control tools
Package management tools
Task runners
Test runners
Synchronized cross-device testing
Continuous Integration tools
Scaffolding tools
Summary
Chapter 3: Working with Functions
Working with functions in TypeScript
Asynchronous programming in TypeScript
Summary
Chapter 4: Object-Oriented Programming with TypeScript
SOLID principles
Classes
Interfaces
Association, aggregation, and composition
Inheritance
Generic classes
Generic constraints
Applying the SOLID principles
Namespaces
Modules
Circular dependencies
Summary
Chapter 5: Runtime
The environment
The runtime
The this operator
Prototypes
Closures
Summary
Chapter 6: Application Performance
Prerequisites
Performance and resources
Performance metrics
Performance analysis
Performance automation
Exception handling
Summary
Chapter 7: Application Testing
Software testing glossary
Prerequisites
Testing planning and methodologies
Setting up a test infrastructure
Creating test assertions, specs, and suites with Mocha and Chai
Test spies and stubs with Sinon.JS
Creating end-to-end tests with Nightwatch.js
Generating test coverage reports
Summary
Chapter 8: Decorators
Prerequisites
Annotations and decorators
Summary
Chapter 9: Application Architecture
The single-page application architecture
The MV* architecture
Common components and features in the MV* frameworks
Choosing an application framework
Writing an MVC framework from scratch
Summary
Chapter 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
Chapter 11: Tools and Frameworks
Installing the prerequisites
Choosing a handy editor
Getting your hands on the workflow
Summary
Chapter 12: The Challenge of Increasing Complexity
Implementing the basics
Growing features
Getting things right
Summary
Chapter 13: Creational Design Patterns
Factory method
Abstract Factory
Builder
Prototype
Singleton
Summary
Chapter 14: Structural Design Patterns
Composite Pattern
Decorator Pattern
Adapter Pattern
Bridge Pattern
Façade Pattern
Flyweight Pattern
Proxy Pattern
Summary
Chapter 15: Behavioral Design Patterns
Chain of Responsibility Pattern
Command Pattern
Memento Pattern
Iterator Pattern
Mediator Pattern
Summary
Chapter 16: Behavioral Design Patterns: Continuous
Strategy Pattern
State Pattern
Template Method Pattern
Observer Pattern
Visitor Pattern
Summary
Chapter 17: Patterns and Architectures in JavaScript and TypeScript
Promise-based web architecture
Modularizing project
Asynchronous patterns
Summary
Chapter 18: SOLID Principles
Single responsibility principle
Open-closed principle
Liskov substitution principle
Interface segregation principle
Dependency inversion principle
Summary
Chapter 19: The Road to Enterprise Application
Creating an application
Building and testing projects
Version control
Continuous integration
Deployment automation
Summary
Chapter 20: TypeScript 2.0 Fundamentals
What is TypeScript?
Quick example
Learning modern JavaScript
Type checking
Summary
Chapter 21: A Weather Forecast Widget with Angular 2
Using modules
Setting up the project
Creating the first component
Adding conditions to the template
Using the component in other components
Showing a forecast
Creating the forecast component
The main component
Summary
Chapter 22: Note-Taking App with a Server
Setting up the project structure
Getting started with NodeJS
Understanding the structural type system
Adding authentication
Testing the API
Adding CRUD operations
Writing the client side
Running the application
Summary
Chapter 23: Real-Time Chat
Setting up the project
Getting started with React
Writing the server
Connecting to the server
Creating the chat room
Comparing React and Angular
Summary
Chapter 24: Native QR Scanner App
Getting started with NativeScript
Creating the project structure
Creating a Hello World page
Creating the main view
Adding a details view
Scanning QR codes
Adding persistent storage
Styling the app
Comparing NativeScript to alternatives
Summary
Chapter 25: Advanced Programming in TypeScript
Using type guards
More accurate type guards
Checking null and undefined
Creating tagged union types
Comparing performance of algorithms
Summary
Chapter 26: Spreadsheet Applications with Functional Programming
Setting up the project
Functional programming
Using data types for expressions
Parsing an expression
Defining the sheet
Using the Flux architecture
Creating actions
Writing the view
Advantages of Flux
Summary
Chapter 27: Pac Man in HTML5
Setting up the project
Using the HTML5 canvas
Designing the framework
Drawing on the canvas
Adding utility functions
Creating the models
Drawing the view
Handling events
Creating the time handler
Running the game
Adding a menu
Summary
Chapter 28: Playing Tic-Tac-Toe against an AI
Creating the project structure
Adding utility functions
Creating the models
Implementing the AI using Minimax
Creating the interface
Testing the AI
Summary
Chapter 29: Migrate JavaScript to TypeScript
Gradually migrating to TypeScript
Adding TypeScript
Migrating each file
Refactoring the project
Summary

Book Details

ISBN 139781787289086
Paperback841 pages
Read More
From 3 reviews

Read More Reviews

Recommended for You

Cross-platform Desktop Application Development: Electron, Node, NW.js, and React Book Cover
Cross-platform Desktop Application Development: Electron, Node, NW.js, and React
$ 35.99
$ 18.00
Bootstrap 4 - Responsive Web Design Book Cover
Bootstrap 4 - Responsive Web Design
$ 71.99
$ 36.00
Statistics for Machine Learning Book Cover
Statistics for Machine Learning
$ 39.99
$ 20.00
DevOps: Puppet, Docker, and Kubernetes Book Cover
DevOps: Puppet, Docker, and Kubernetes
$ 79.99
$ 40.00
Linux: Powerful Server Administration Book Cover
Linux: Powerful Server Administration
$ 79.99
$ 40.00
Web Development with MongoDB and Node - Third Edition Book Cover
Web Development with MongoDB and Node - Third Edition
$ 31.99
$ 16.00