HATE JAVASCRIPT? TRY TYPESCRIPT
Ben Hoel(ng @benhnet b.hoel'[email protected]
Ben Hoel(ng In truth, he’s just a big kid. He loves designing systems that solve real world problems. There is nothing more sa(sfying than seeing something you helped develop being used by the end users. Ben is also involved in the technology community and runs the South Colorado .NET user group. He also enjoys speaking at tech groups and events around the country.
Ben Hoel(ng @benhnet b.hoel([email protected]
Agenda: v TypeScript Defined v What’s wrong with JavaScript v What’s right with TypeScript v TypeScript Basics v TypeScript and ASP.NET (Web Forms
and MVC) v TypeScript for Windows 8 Apps
TYPESCRIPT DEFINED v A coding language that compiles to
JavaScript and provides strong typing and other modern coding language features
What’s Wrong with JavaScript
ISSUES WITH JAVASCRIPT v Dynamic Typing Leads to Run Time Errors v Lack of Maintainability, Scalability v Fine for Small Apps v Takes Effort to Write and Learn how to
Write Clean Code v Client Side JavaScript Coding is Different
What’s Right with TypeScript
TYPESCRIPT ROCKS! v “Compiles” to JavaScript v Provides Intent at Design Time v Any Browser, Any Host (Node.js), Any OS v Open Source + Tooling Support v Static Typed v Provides Encapsulation
v Interfaces v Classes v Modules
TypeScript Basics
THE BASICS -‐ AMBIENT DECLARES v “declare” Keyword
THE BASICS -‐ TYPES DEFINITIONS v “:” To Force a Type Definition
THE BASICS – FUNCTION SIGNATURES
THE BASICS – INTERFACES
THE BASICS – CLASSES
THE BASICS – MODULES
TypeScript Basics Demo
TypeScript and the Web Demo
TypeScript and Windows 8 Demo
19
TYPESCRIPT WRAP-‐UP
JavaScript’s Shortcomings
TypeScript Basics TypeScript for the Enterprise
JavaScript is dynamically typed, which can lead to run-‐(me errors. Encapsula(ng
JavaScript is difficult, which makes it hard
to us in large applica(ons.
TypeScript is a superset of JavaScript. It
provides sta(c typing to improve tooling and design-‐(me valida(on. It
provides the ability to encapsulate your
scripts.
Tooling for TypeScript is
provided for ASP.NET and Windows 8 applica(ons by
installing a plug-‐in for Visual Studio.
Resources: v http://www.typescriptlang.org v http://msdn.microsoft.com/en-us/magazine/
jj983351.aspx v http://msdn.microsoft.com/en-us/magazine/
jj870740.aspx v Pluralsight Course v http://blogs.msdn.com/b/typescript/ v http://typescript.codeplex.com/wikipage?
title=Roadmap&referringTitle=Home
HATE JAVASCRIPT? TRY TYPESCRIPT
Ben Hoel(ng @benhnet b.hoel'[email protected]