Building Next Generation Apps with Typescript
Total Page:16
File Type:pdf, Size:1020Kb
Building Next Generation Apps with TypeScript Rachel Appel Appel Consulting http://RachelAppel.com http://Twitter.com/RachelAppel http://Linkedin.com/rachelappel Agenda • TypeScript Intro • Tools • Compilation • Types • Classes • Inheritance • Debugging • Web and Apps Get TypeScript http://www.typescriptlang.org TypeScript in the Wild • Bing • Monaco TypeScript Features Superset of ES5 / ES6 JavaScript Visual Studio Type Checking Webstorm Browser tools Syntactic Next-gen Sugar JavaScript for the enterprise Generics & Arrow Classes Functions Dot notation for properties Why use TypeScript? More and more server side JavaScript was logic using JavaScript SPA App designed for a (Node.JS) model sapling DOM tree JavaScript apps are becoming C# coders forced into quite complex OOP is easier JavaScript http://www.typescriptlang.org/playground Web/HTML/ASP.NET Visual Studio Windows Store JavaScript Program organizationProgram Module Module Class Class Method Members Property Class Members Class Class Members Members DEMO • TypeScript programs in Visual Studio TypeScript Compilation TypeScript .ts Compiler JavaScript .js TypeScript compilation Types • Primitive and Object • Any • Number • Boolean • String • Null * • Undefined * • Object • Void * • HTMLElement • Functions • Enum Type annotations • Argument types • Return types • Type inference DEMO • Types and annotations Classes TS JS Classes: Constructors TS JS Classes: Members TS JS Enums Classes: Access modifiers Accessing a Class and its members DEMO • Creating and using a class Inheritance TS JS DEMO • Inheritance Debugging TypeScript DEMO • Debugging Web and Apps • HTML • ASP.NET WebForms and ASP.NET MVC • Windows Store JavaScript apps http://bit.ly/15iOfFt Thank You! Rachel Appel [email protected] http://RachelAppel.com http://Twitter.com/RachelAppel http://LinkedIn.com/RachelAppel http://bit.ly/RachNOW Use code APPEL-13 for a 14 day free trial! .