SlideShare a Scribd company logo
USING
TYPESCRIPT
WITH
ANGULARJS
Jamal O’Garro
NYC Camp 2015 / Front-end Camp
July 16, 2015
Software Engineer + Instructor
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
• TypeScript
Overview
• AngularJS
Review
• Sample App
• Takeaways
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WORKSHOP ROADMAP
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
MEET YOUR INSTRUCTOR
• Self-taught developer
• Hip-hop Head, sneakerhead, part-time A&R,
painter and photographer extraordinaire
• Secretly in love with Finance and Economics
• True Knicks, Yankees + Giants fan!!!
• Enjoys teaching + mentoring
• Organizer: Code Crew, MEAN NYC, I CODE
NY
• Languages: JavaScript, TypeScript, Ruby,
Python, C, Objective-C, Swift, Haskell
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
CAREER ROADMAP
INTRO TO TYPESCRIPT
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHAT IS TYPESCRIPT?
• Superset of JavaScript
• JavaScript w/ Strong Typing + Other features
• Made by Microsoft
• Will be supported in Angular 2.0
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHAT ARE TYPESCRIPT’S GOALS?
• To statically identify constructs that are most likely to
cause errors
• To provide a mechanism for organizing large code bases
• To be a language for large scale JavaScript applications
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
THE PROS
• Optional strong typing for a dynamically typed language
• Since it compiles down to JavaScript you can easily switch from
JavaScript to plain JS
• Allows us to use proposed ES6/2015 features now
• Has a more OOP feel (good for Java/C#/etc. devs)
• Easy for JavaScript developers to migrate to
• Helps us write fewer unit tests
• Runs on any browser, host or operating system
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
ES6 FEATURES NOW
• Classes
• Classical-style Inheritance
• Modules
• Arrow functions
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
MORE COOL STUFF!
• Interfaces
• Optionals
• Generics
• Type Inference
• Declaration Files
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
THE CONS
• “Slower” development time
• Lack of support for some third-party libraries
• An extra step by compiling code before running in
browser
• Still vulnerable to JavaScript gotchas so you need to
know JavaScript!
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
ALTERNATIVES
• Dart
• CoffeeScript
• ClojureScript
• Fay
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHY USE TYPESCRIPT?
• Building enterprise level applications
• Helps prevent bugs by enforcing code organization
• Makes your JS slightly easier to read
• Enforces good coding practices
• Helps make your JavaScript more Object-oriented
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
LET’S WRITE SOME CODE!
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
ANGULAR REVIEW
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHAT IS ANGULARJS?
• Framework for building single-page applications
• Based on service based architecture, data binding and
dependency injection
• Open source and maintained by Google
• Is often referred to as being a MV* framework
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
ANGULAR PHILOSOPHY
• What HTML would have been if it were created today
• HTML should be dynamic
• Code should be modular and easy to test
• Components should be reusable
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHY USE ANGULAR?
• Rapid development
• Code organization
• Performance
• Easy to test
• Community
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
MVVM DESIGN PATTERN
BROWSER
VIEW VIEWMODEL MODEL
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
DEPENDENCY INJECTION
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
SERVICE BASED ARCHITECTURE
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
FACTORY/SERVICE
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
LET’S BUILD OUR APP!
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
LESSONS LEARNED
• Though it helps make your code more bullet-proof it does take longer
to write code using TypeScript
• The slightly slower development comes in handy when you have less
bugs to fix
• Don’t fall into the “any” trap
• Run into some issues with writing test coverage on compiled
TypeScript
• Try not to mix JS and TypeScript together
• Gradually migrate to TS and then convert your JS over
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
WHAT’S NEXT FOR TS + ANGULAR?
• Will ship with Angular by default though you can still use
Vanilla JS
• Some AtScript features will merge with TypeScript
• TypeScript will get more ES6 and ES7 features including
generators, symbols, let/const, async/await
• Heavy co-development between both Google and Microsoft
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
RESOURCES
• DefinitelyTyped
• TSLint
• TypeScript Playground
• TypeScript Reference
• TypeScript Roadmap
• IDEs: Visual Studio / Webstorm (have TypeScript support)
• Angular.io
• r/angularjs
• r/typescript
CODE CREW | USING TYPESCRIPT WITH ANGULARJS
THANKS MUCH!!!
Jamal O’Garro
NYC Camp 2015 / Front-end Camp
July 16, 2015
Software Engineer + Instructor
CODE CREW | USING TYPESCRIPT WITH ANGULARJS

More Related Content

What's hot

What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
Troy Miles
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
FITC
 
React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"
Itaru Kitagawa
 
PPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPPT on Angular 2 Development Tutorial
PPT on Angular 2 Development Tutorial
Paddy Lock
 
End-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScriptEnd-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScript
Gil Fink
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
Troy Miles
 
1.3にBrowserify組み合わせてイベント駆動にした話
1.3にBrowserify組み合わせてイベント駆動にした話1.3にBrowserify組み合わせてイベント駆動にした話
1.3にBrowserify組み合わせてイベント駆動にした話
Okuno Kentaro
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
Dhyego Fernando
 
React Native
React NativeReact Native
React Native
Artyom Trityak
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
Paweł Żurowski
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
Barak Cohen
 
Introduction for Master Class "Amazing Reactive Forms"
Introduction for Master Class "Amazing Reactive Forms"Introduction for Master Class "Amazing Reactive Forms"
Introduction for Master Class "Amazing Reactive Forms"
Fabio Biondi
 
Angular CLI : HelloWorld
Angular CLI : HelloWorldAngular CLI : HelloWorld
Angular CLI : HelloWorld
nikspatel007
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
Dani Akash
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
Christoffer Noring
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
Fabio Biondi
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
Tadeu Zagallo
 
Angular 2
Angular 2Angular 2
Angular 2
Nigam Goyal
 
Angular 4 and TypeScript
Angular 4 and TypeScriptAngular 4 and TypeScript
Angular 4 and TypeScript
Ahmed El-Kady
 
Angular2
Angular2Angular2

What's hot (20)

What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
 
React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"React UI Development: Introduction to "UI Component as API"
React UI Development: Introduction to "UI Component as API"
 
PPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPPT on Angular 2 Development Tutorial
PPT on Angular 2 Development Tutorial
 
End-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScriptEnd-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScript
 
ReactJS.NET
ReactJS.NETReactJS.NET
ReactJS.NET
 
1.3にBrowserify組み合わせてイベント駆動にした話
1.3にBrowserify組み合わせてイベント駆動にした話1.3にBrowserify組み合わせてイベント駆動にした話
1.3にBrowserify組み合わせてイベント駆動にした話
 
Introduction to angular 2
Introduction to angular 2Introduction to angular 2
Introduction to angular 2
 
React Native
React NativeReact Native
React Native
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
 
React Native for ReactJS Devs
React Native for ReactJS DevsReact Native for ReactJS Devs
React Native for ReactJS Devs
 
Introduction for Master Class "Amazing Reactive Forms"
Introduction for Master Class "Amazing Reactive Forms"Introduction for Master Class "Amazing Reactive Forms"
Introduction for Master Class "Amazing Reactive Forms"
 
Angular CLI : HelloWorld
Angular CLI : HelloWorldAngular CLI : HelloWorld
Angular CLI : HelloWorld
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
 
Angular 2
Angular 2Angular 2
Angular 2
 
Angular 4 and TypeScript
Angular 4 and TypeScriptAngular 4 and TypeScript
Angular 4 and TypeScript
 
Angular2
Angular2Angular2
Angular2
 

Viewers also liked

AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
Alessandro Giorgetti
 
Building Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScriptBuilding Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScript
ColdFusionConference
 
Angular2 / Typescript symposium Versusmind
Angular2 / Typescript symposium VersusmindAngular2 / Typescript symposium Versusmind
Angular2 / Typescript symposium Versusmind
Philippe Didiergeorges
 
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
David Pichsenmeister
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
MSDEVMTL
 
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式Will Huang
 
TypeScript Seminar
TypeScript SeminarTypeScript Seminar
TypeScript Seminar
Haim Michael
 
play! scala file resource handling and image resizing
play! scala file resource handling and image resizingplay! scala file resource handling and image resizing
play! scala file resource handling and image resizing
David Pichsenmeister
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
Sander Mak (@Sander_Mak)
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviIntroduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
Winston Levi
 

Viewers also liked (12)

AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Building Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScriptBuilding Better AngularJS 1.X Apps With TypeScript
Building Better AngularJS 1.X Apps With TypeScript
 
Angular2 / Typescript symposium Versusmind
Angular2 / Typescript symposium VersusmindAngular2 / Typescript symposium Versusmind
Angular2 / Typescript symposium Versusmind
 
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
The Hitchhikers Guide To Html5 Offline Strategies (+firefoxOS)
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
 
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式
TypeScript 開發實戰:開發即時互動的 html5 websocket 聊天室應用程式
 
TypeScript Seminar
TypeScript SeminarTypeScript Seminar
TypeScript Seminar
 
play! scala file resource handling and image resizing
play! scala file resource handling and image resizingplay! scala file resource handling and image resizing
play! scala file resource handling and image resizing
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviIntroduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
 

Similar to Using TypeScript with Angular

Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
ColdFusionConference
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
devObjective
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
NCCOMMS
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jamal Sinclair O'Garro
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Travis van der Font
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI Spec
Adam Paxton
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)
Tony Tam
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript Language
Gil Fink
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript LimitationsBenefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript Limitations
Srinivasa Perumal
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
Christian Heilmann
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
Techday7
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
Justin Wendlandt
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code Review
Milan Vukoje
 
Typescript: JS code just got better!
Typescript: JS code just got better!Typescript: JS code just got better!
Typescript: JS code just got better!
amit bezalel
 
Javascript as universal language
Javascript as universal languageJavascript as universal language
Javascript as universal languageRonald Harmsen
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
Miroslav Resetar
 
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft GraphSharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
Sébastien Levert
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
JavaScript: Past, Present, Future
JavaScript: Past, Present, FutureJavaScript: Past, Present, Future
JavaScript: Past, Present, Future
Jungryul Choi
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 

Similar to Using TypeScript with Angular (20)

Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI Spec
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript Language
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript LimitationsBenefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript Limitations
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code Review
 
Typescript: JS code just got better!
Typescript: JS code just got better!Typescript: JS code just got better!
Typescript: JS code just got better!
 
Javascript as universal language
Javascript as universal languageJavascript as universal language
Javascript as universal language
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft GraphSharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
SharePoint Fest Chicago - Introduction to AngularJS with the Microsoft Graph
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
 
JavaScript: Past, Present, Future
JavaScript: Past, Present, FutureJavaScript: Past, Present, Future
JavaScript: Past, Present, Future
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 

More from Jamal Sinclair O'Garro

A Look at TensorFlow.js
A Look at TensorFlow.jsA Look at TensorFlow.js
A Look at TensorFlow.js
Jamal Sinclair O'Garro
 
Intro to React
Intro to ReactIntro to React
Intro to React
Jamal Sinclair O'Garro
 
React + Redux for Web Developers
React + Redux for Web DevelopersReact + Redux for Web Developers
React + Redux for Web Developers
Jamal Sinclair O'Garro
 
Intro to ionic 2
Intro to ionic 2Intro to ionic 2
Intro to ionic 2
Jamal Sinclair O'Garro
 
Intro to ES6 / ES2015
Intro to ES6 / ES2015Intro to ES6 / ES2015
Intro to ES6 / ES2015
Jamal Sinclair O'Garro
 
The Ten Code Commandments
The Ten Code CommandmentsThe Ten Code Commandments
The Ten Code Commandments
Jamal Sinclair O'Garro
 
Intro to UI-Router/TypeScript
Intro to UI-Router/TypeScriptIntro to UI-Router/TypeScript
Intro to UI-Router/TypeScript
Jamal Sinclair O'Garro
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
Jamal Sinclair O'Garro
 
Intro to iOS Development
Intro to iOS DevelopmentIntro to iOS Development
Intro to iOS Development
Jamal Sinclair O'Garro
 
Intro to rails 2_kg_edited
Intro to rails 2_kg_editedIntro to rails 2_kg_edited
Intro to rails 2_kg_edited
Jamal Sinclair O'Garro
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
Jamal Sinclair O'Garro
 
Intro to javascript (4 week)
Intro to javascript (4 week)Intro to javascript (4 week)
Intro to javascript (4 week)
Jamal Sinclair O'Garro
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
Jamal Sinclair O'Garro
 
Intro to Programming
Intro to ProgrammingIntro to Programming
Intro to Programming
Jamal Sinclair O'Garro
 

More from Jamal Sinclair O'Garro (14)

A Look at TensorFlow.js
A Look at TensorFlow.jsA Look at TensorFlow.js
A Look at TensorFlow.js
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React + Redux for Web Developers
React + Redux for Web DevelopersReact + Redux for Web Developers
React + Redux for Web Developers
 
Intro to ionic 2
Intro to ionic 2Intro to ionic 2
Intro to ionic 2
 
Intro to ES6 / ES2015
Intro to ES6 / ES2015Intro to ES6 / ES2015
Intro to ES6 / ES2015
 
The Ten Code Commandments
The Ten Code CommandmentsThe Ten Code Commandments
The Ten Code Commandments
 
Intro to UI-Router/TypeScript
Intro to UI-Router/TypeScriptIntro to UI-Router/TypeScript
Intro to UI-Router/TypeScript
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Intro to iOS Development
Intro to iOS DevelopmentIntro to iOS Development
Intro to iOS Development
 
Intro to rails 2_kg_edited
Intro to rails 2_kg_editedIntro to rails 2_kg_edited
Intro to rails 2_kg_edited
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
 
Intro to javascript (4 week)
Intro to javascript (4 week)Intro to javascript (4 week)
Intro to javascript (4 week)
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
Intro to Programming
Intro to ProgrammingIntro to Programming
Intro to Programming
 

Recently uploaded

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 

Recently uploaded (20)

GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 

Using TypeScript with Angular

  • 1. USING TYPESCRIPT WITH ANGULARJS Jamal O’Garro NYC Camp 2015 / Front-end Camp July 16, 2015 Software Engineer + Instructor CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 2. • TypeScript Overview • AngularJS Review • Sample App • Takeaways CODE CREW | USING TYPESCRIPT WITH ANGULARJS WORKSHOP ROADMAP
  • 3. CODE CREW | USING TYPESCRIPT WITH ANGULARJS MEET YOUR INSTRUCTOR • Self-taught developer • Hip-hop Head, sneakerhead, part-time A&R, painter and photographer extraordinaire • Secretly in love with Finance and Economics • True Knicks, Yankees + Giants fan!!! • Enjoys teaching + mentoring • Organizer: Code Crew, MEAN NYC, I CODE NY • Languages: JavaScript, TypeScript, Ruby, Python, C, Objective-C, Swift, Haskell
  • 4. CODE CREW | USING TYPESCRIPT WITH ANGULARJS CAREER ROADMAP
  • 5. INTRO TO TYPESCRIPT CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 6. WHAT IS TYPESCRIPT? • Superset of JavaScript • JavaScript w/ Strong Typing + Other features • Made by Microsoft • Will be supported in Angular 2.0 CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 7. WHAT ARE TYPESCRIPT’S GOALS? • To statically identify constructs that are most likely to cause errors • To provide a mechanism for organizing large code bases • To be a language for large scale JavaScript applications CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 8. THE PROS • Optional strong typing for a dynamically typed language • Since it compiles down to JavaScript you can easily switch from JavaScript to plain JS • Allows us to use proposed ES6/2015 features now • Has a more OOP feel (good for Java/C#/etc. devs) • Easy for JavaScript developers to migrate to • Helps us write fewer unit tests • Runs on any browser, host or operating system CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 9. ES6 FEATURES NOW • Classes • Classical-style Inheritance • Modules • Arrow functions CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 10. MORE COOL STUFF! • Interfaces • Optionals • Generics • Type Inference • Declaration Files CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 11. THE CONS • “Slower” development time • Lack of support for some third-party libraries • An extra step by compiling code before running in browser • Still vulnerable to JavaScript gotchas so you need to know JavaScript! CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 12. ALTERNATIVES • Dart • CoffeeScript • ClojureScript • Fay CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 13. WHY USE TYPESCRIPT? • Building enterprise level applications • Helps prevent bugs by enforcing code organization • Makes your JS slightly easier to read • Enforces good coding practices • Helps make your JavaScript more Object-oriented CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 14. LET’S WRITE SOME CODE! CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 15. ANGULAR REVIEW CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 16. WHAT IS ANGULARJS? • Framework for building single-page applications • Based on service based architecture, data binding and dependency injection • Open source and maintained by Google • Is often referred to as being a MV* framework CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 17. ANGULAR PHILOSOPHY • What HTML would have been if it were created today • HTML should be dynamic • Code should be modular and easy to test • Components should be reusable CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 18. WHY USE ANGULAR? • Rapid development • Code organization • Performance • Easy to test • Community CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 19. MVVM DESIGN PATTERN BROWSER VIEW VIEWMODEL MODEL CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 20. DEPENDENCY INJECTION CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 21. SERVICE BASED ARCHITECTURE CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 22. FACTORY/SERVICE CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 23. LET’S BUILD OUR APP! CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 24. LESSONS LEARNED • Though it helps make your code more bullet-proof it does take longer to write code using TypeScript • The slightly slower development comes in handy when you have less bugs to fix • Don’t fall into the “any” trap • Run into some issues with writing test coverage on compiled TypeScript • Try not to mix JS and TypeScript together • Gradually migrate to TS and then convert your JS over CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 25. WHAT’S NEXT FOR TS + ANGULAR? • Will ship with Angular by default though you can still use Vanilla JS • Some AtScript features will merge with TypeScript • TypeScript will get more ES6 and ES7 features including generators, symbols, let/const, async/await • Heavy co-development between both Google and Microsoft CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 26. RESOURCES • DefinitelyTyped • TSLint • TypeScript Playground • TypeScript Reference • TypeScript Roadmap • IDEs: Visual Studio / Webstorm (have TypeScript support) • Angular.io • r/angularjs • r/typescript CODE CREW | USING TYPESCRIPT WITH ANGULARJS
  • 27. THANKS MUCH!!! Jamal O’Garro NYC Camp 2015 / Front-end Camp July 16, 2015 Software Engineer + Instructor CODE CREW | USING TYPESCRIPT WITH ANGULARJS