leveraging typescript in cross-functional development teams aaron mcgee, richard brookes m216
TRANSCRIPT
![Page 1: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/1.jpg)
![Page 2: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/2.jpg)
Leveraging TypeScript in Cross-functional development teamsAaron McGee, Richard Brookes M216
![Page 3: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/3.jpg)
Building Better Apps
![Page 4: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/4.jpg)
The JavaScript problem
![Page 5: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/5.jpg)
Photo by Thomas Quilne, Flickr, Creative Commons Attribution 2.0 Generic
![Page 6: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/6.jpg)
Solution: Enter TypeScript
![Page 7: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/7.jpg)
Syntactic Sugar
Photo by Daniel Horacio Agostini, Flickr, Attribution-NonCommercial-NoDerivs 2.0 Generic
![Page 8: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/8.jpg)
Basic Types
![Page 9: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/9.jpg)
Basic Typesvar typeScriptBoolean: boolean = true;
var typeScriptNumber: number = 10;
var typeScriptString: string = "Hello World";
var anyOldType: any = "what evs";
![Page 10: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/10.jpg)
Compiledvar typeScriptBoolean = true;var typeScriptNumber = 10;var typeScriptString = "Hello World";var anyOldType = "what evs";
![Page 11: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/11.jpg)
Enums
![Page 12: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/12.jpg)
Enumenum Color { Red, Green, Blue };
var c: Color = Color.Green;
![Page 13: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/13.jpg)
Enum - Compiledvar Color;(function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue";})(Color || (Color = {}));;var c = 1 /* Green */;
![Page 14: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/14.jpg)
Arrays
![Page 15: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/15.jpg)
Arrayvar list: number[] = [1, 2, 3];
var list: Array<number> = [1, 2, 3];
![Page 16: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/16.jpg)
Compiles to:var list = [1, 2, 3];
![Page 17: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/17.jpg)
Interfaces
![Page 18: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/18.jpg)
Interfaceinterface ILabelledValue { label: string;}function printLabel(labelledObj: ILabelledValue) { console.log(labelledObj.label);}var myObj = { size: 10, label: "Size 10" };printLabel(myObj);
![Page 19: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/19.jpg)
Compiles to:function printLabel(labelledObj) { console.log(labelledObj.label);}var myObj = { size: 10, label: "Size 10" };printLabel(myObj);
![Page 20: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/20.jpg)
Function Types
![Page 21: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/21.jpg)
Function Typesinterface SearchFunc { (source: string, subString:string): boolean;}var mySearch: SearchFunc;mySearch = function(src: string, sub: string) { //some implementation return true;}
![Page 22: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/22.jpg)
Compiles to:var mySearch;mySearch = function (src, sub) { //some implementation return true;};
![Page 23: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/23.jpg)
Classes
![Page 24: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/24.jpg)
TypeScript Class:interface ClockInterface { currentTime: Date;}
class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { }}
![Page 25: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/25.jpg)
Compiles to:var Clock = (function () { function Clock(h, m) { } return Clock;})();
![Page 26: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/26.jpg)
Modules for organsiation
![Page 27: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/27.jpg)
TypeScript Modulemodule Time { export interface ClockInterface { currentTime: Date; } export class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { } }
}
![Page 28: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/28.jpg)
Compiles to:var Time;(function (Time) { var Clock = (function () { function Clock(h, m) { } return Clock; })(); Time.Clock = Clock;})(Time || (Time = {}));
![Page 29: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/29.jpg)
Demo
Aaron McGee
![Page 30: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/30.jpg)
Connecting Frontend and Backend
Photo by Ucumari Photography, Flickr, Attribution-NonCommercial-NoDerivs 2.0 Generic
![Page 31: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/31.jpg)
Photo by daveynin, Flickr, Attribution 2.0 Generic
![Page 32: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/32.jpg)
Photo by Ben Garney, Flickr, Attribution 2.0 Generic
When there’s duplication…
![Page 33: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/33.jpg)
![Page 34: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/34.jpg)
Demonstration
Richard Brookes
![Page 35: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/35.jpg)
…but there are still problems
![Page 36: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/36.jpg)
Unifying Frontend and Backend
Photo by OneFuller, Flickr, Attribution-NoDerivs 2.0 Generic
![Page 37: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/37.jpg)
Model Generation
![Page 38: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/38.jpg)
Photo by Ubé, Flickr, Attribution-NonCommercial-NoDerivs 2.0 Generic
![Page 39: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/39.jpg)
The 3 stages of Model Generation Build Generate Repeat
![Page 40: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/40.jpg)
Photo by NH567, Flickr, Attribution-NonCommercial 2.0 Generic
![Page 41: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/41.jpg)
Demonstration
Richard Brookes
![Page 42: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/42.jpg)
Conclusion
![Page 44: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/44.jpg)
The future of TypeScript generation?
![Page 45: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/45.jpg)
Q&A
![Page 46: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/46.jpg)
Related Ignite NZ Sessions
Building Azure Web Apps with Node.js and the Spotify Web API [M361]Thurs 4:30pm
Javascript on mobile - Cordova less of a (phone) gap than ever [M334] Wed 4:30pm
ASP.NET MVC vNext with Visual Studio 2015’s new tools [M364]Fri 9:00am
Universal Apps: A Developers Guide [M257]Wed 9:00am
Find me later at… Hub Happy Hour Wed 5:30-6:30pm Hub Happy Hour Thu 5:30-6:30pm Closing drinks Fri 3:00-4:30pm
1
2
3
4
![Page 47: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/47.jpg)
Resources
TechNet & MSDN FlashSubscribe to our fortnightly newsletter
http://aka.ms/technetnz http://aka.ms/msdnnz
http://aka.ms/ch9nz
Microsoft Virtual AcademyFree Online Learning
http://aka.ms/mva
Sessions on Demand
![Page 48: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/48.jpg)
Complete your session evaluation now and win!
![Page 49: Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216](https://reader035.vdocument.in/reader035/viewer/2022062804/5697bfa11a28abf838c95779/html5/thumbnails/49.jpg)
© 2015 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or
other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.