SlideShare a Scribd company logo
BUILDING END-TO-END
SPA USING TYPESCRIPT
Gil Fink
sparXys CEO
About Me
• sparXys CEO and senior consultant
• ASP.NET/IIS Microsoft MVP in the last 6 years
• Pro Single Page Application Development (Apress)
co-author
• 4 Microsoft Official Courses (MOCs) co-author
• GDG Rashlatz and ng-conf Israel co-organizer
Agenda
• TypeScript?
• Building a Simple App with TypeScript
• Summary
Wait!
End to end JavaScript?
Are you nuts?
"JavaScript is the assembly
language of the Web"
Erik Meijer
“You can write large
programs in JavaScript. You
just can’t maintain them”
Anders Hejlsberg
Some Alternatives
• We have several alternatives:
• Hard core JavaScript development
• JavaScript preprocessors
• CoffeeScript – http://coffeescript.org
• Dart – http://dartlang.org
• Clojurescript - https://github.com/clojure/clojurescript
• Script# - http://scriptsharp.com/
What is TypeScript?
“TypeScript is a typed superset of JavaScript that
compiles to plain JavaScript” ~typescriptlang.org
Hello TypeScript
Demo
TypeScript Key Features
Support
standard
JavaScript
code with
static typing
Encapsulation
through classes
and modules
Support for
constructors,
properties and
functions
Interfaces and
enums
support
Lambda and
generics
support
Intellisense
and syntax
checking
From TypeScript to
JavaScript
11
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return “Hi," + this.greeting;
}
}
TypeScript Code JavaScript Code
TypeScript
Compiler
var Greeter = (function () {
function Greeter(message) {
this.greeting = message;
}
Greeter.prototype.greet =
function () {
return “Hi," + this.greeting;
};
return Greeter;
})();
tsc.js
TypeScript Type
Annotations
• You can add type annotations to variables and
functions
12
var str: string = ‘hello’; // str is annotated as string
function foo(name: string) : string { // parameter and function annotated
return ‘hello’ + name;
}
Classes and Interfaces
• You can define classes
• You can define interfaces
o And implement them later
interface IGreeter {
greet(): void;
}
class Greeter implements IGreeter{
greeting: string;
greet() {
console.log(this.greeting);
}
}
var Greeter = (function () {
function Greeter() {
}
Greeter.prototype.greet = function () {
console.log(this.greeting);
};
return Greeter;
})();
Modules
• You define modules to wrap classes, interfaces and
functionality
• Use import and export keywords
•module app {
export interface IGreeter {
greet(): void;
}
export class Greeter implements IGreeter {
greeting: string;
greet() {
console.log(this.greeting);
}
}
}
var app;
(function (app) {
var Greeter = (function () {
function Greeter() {
}
Greeter.prototype.greet = function () {
console.log(this.greeting);
};
return Greeter;
})();
app.Greeter = Greeter;
})(app || (app = {}));
Classes, Modules and Interfaces
Demo
Building a Simple End-to-End App with
TypeScript
Demo
Questions?
Summary
• Open source language that compiles into
JavaScript
• Key features:
• Code encapsulation
• Maintainable code
• Tooling support
• Learn TypeScript today!
Resources
• TypeScript – http://www.typescriptlang.org
• TypeScript Source Code -
https://github.com/Microsoft/TypeScript
• Definitely Typed –
https://github.com/borisyankov/DefinitelyTyped
• My Website – http://www.gilfink.net
• Follow me on Twitter – @gilfink
Thank You!

More Related Content

What's hot (19)

PPTX
Nativescript
Software Infrastructure
 
PPTX
Angular CLI : HelloWorld
nikspatel007
 
PPTX
Web Development: Making it the right way
Yagiz Nizipli
 
PPTX
TypeScript
Software Infrastructure
 
PPTX
Hybrid Application Development
Yagiz Nizipli
 
PDF
Use React tools for better Angular apps
Martin Hochel
 
PDF
Introduction to React Native
Polidea
 
PPTX
Creating Custom HTML Helpers In ASP.NET MVC
Lohith Goudagere Nagaraj
 
PDF
Алексей Волков "Введение в React Native"
Fwdays
 
PDF
Golang #5: To Go or not to Go
Oliver N
 
PDF
Angular SEO
Tiang Cheng
 
PPTX
Angle Forward with TypeScript
Jeremy Likness
 
PPTX
Introduction To Rust Language - Chester Devs
Andy Lowry
 
PDF
Angular ❤️ CMS from #AngularUp
Filip Bruun Bech-Larsen
 
PDF
Angular ❤️CMS
Filip Bruun Bech-Larsen
 
PDF
KC Java Android Talk (March 2011)
osake
 
PPTX
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
PPTX
Java script
19TUIT038KAVIARASUM
 
PDF
Drupal and contribution (2010 - 2011 / 2)
Peter Arato
 
Angular CLI : HelloWorld
nikspatel007
 
Web Development: Making it the right way
Yagiz Nizipli
 
Hybrid Application Development
Yagiz Nizipli
 
Use React tools for better Angular apps
Martin Hochel
 
Introduction to React Native
Polidea
 
Creating Custom HTML Helpers In ASP.NET MVC
Lohith Goudagere Nagaraj
 
Алексей Волков "Введение в React Native"
Fwdays
 
Golang #5: To Go or not to Go
Oliver N
 
Angular SEO
Tiang Cheng
 
Angle Forward with TypeScript
Jeremy Likness
 
Introduction To Rust Language - Chester Devs
Andy Lowry
 
Angular ❤️ CMS from #AngularUp
Filip Bruun Bech-Larsen
 
Angular ❤️CMS
Filip Bruun Bech-Larsen
 
KC Java Android Talk (March 2011)
osake
 
Exploring Ruby on Rails and PostgreSQL
Barry Jones
 
Java script
19TUIT038KAVIARASUM
 
Drupal and contribution (2010 - 2011 / 2)
Peter Arato
 

Similar to End-to-End SPA Development using TypeScript (20)

PDF
Getting Started with TypeScript
Gil Fink
 
PDF
Building End-to-End Apps Using Typescript
Gil Fink
 
PDF
End to-end apps with type script
Gil Fink
 
PDF
One language to rule them all type script
Gil Fink
 
PDF
Mini-Training: TypeScript
Betclic Everest Group Tech Team
 
PPTX
Typescript in 30mins
Udaya Kumar
 
PPTX
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
PPTX
JSLounge - TypeScript 소개
Reagan Hwang
 
PDF
Angular
Lilia Sfaxi
 
PPTX
TypeScript . the JavaScript developer best friend!
Alessandro Giorgetti
 
PDF
"Xapi-lang For declarative code generation" By James Nelson
GWTcon
 
PDF
Graphql usage
Valentin Buryakov
 
PPTX
How to build Sdk? Best practices
Vitali Pekelis
 
PDF
Module, AMD, RequireJS
偉格 高
 
PPTX
Angular2
Oswald Campesato
 
PPT
Android - Android Application Configuration
Vibrant Technologies & Computers
 
PPTX
Javascript Best Practices and Intro to Titanium
Techday7
 
PPTX
Welcome to React.pptx
PraveenKumar680401
 
PDF
Crystal internals (part 1)
Ary Borenszweig
 
PDF
Crystal internals (part 1)
Ary Borenszweig
 
Getting Started with TypeScript
Gil Fink
 
Building End-to-End Apps Using Typescript
Gil Fink
 
End to-end apps with type script
Gil Fink
 
One language to rule them all type script
Gil Fink
 
Mini-Training: TypeScript
Betclic Everest Group Tech Team
 
Typescript in 30mins
Udaya Kumar
 
GraphQL - The new "Lingua Franca" for API-Development
jexp
 
JSLounge - TypeScript 소개
Reagan Hwang
 
Angular
Lilia Sfaxi
 
TypeScript . the JavaScript developer best friend!
Alessandro Giorgetti
 
"Xapi-lang For declarative code generation" By James Nelson
GWTcon
 
Graphql usage
Valentin Buryakov
 
How to build Sdk? Best practices
Vitali Pekelis
 
Module, AMD, RequireJS
偉格 高
 
Android - Android Application Configuration
Vibrant Technologies & Computers
 
Javascript Best Practices and Intro to Titanium
Techday7
 
Welcome to React.pptx
PraveenKumar680401
 
Crystal internals (part 1)
Ary Borenszweig
 
Crystal internals (part 1)
Ary Borenszweig
 
Ad

More from Gil Fink (20)

PDF
Becoming a Tech Speaker
Gil Fink
 
PPTX
Web animation on steroids web animation api
Gil Fink
 
PDF
The Time for Vanilla Web Components has Arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Being a tech speaker
Gil Fink
 
PDF
Working with Data in Service Workers
Gil Fink
 
PDF
Demystifying Angular Animations
Gil Fink
 
PDF
Redux data flow with angular
Gil Fink
 
PDF
Redux data flow with angular
Gil Fink
 
PDF
Who's afraid of front end databases?
Gil Fink
 
PDF
Web component driven development
Gil Fink
 
PDF
Web components
Gil Fink
 
PDF
Redux data flow with angular 2
Gil Fink
 
PDF
Biological Modeling, Powered by AngularJS
Gil Fink
 
PDF
Who's afraid of front end databases
Gil Fink
 
PDF
Biological modeling, powered by angular js
Gil Fink
 
PDF
Web components the future is here
Gil Fink
 
Becoming a Tech Speaker
Gil Fink
 
Web animation on steroids web animation api
Gil Fink
 
The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Being a tech speaker
Gil Fink
 
Working with Data in Service Workers
Gil Fink
 
Demystifying Angular Animations
Gil Fink
 
Redux data flow with angular
Gil Fink
 
Redux data flow with angular
Gil Fink
 
Who's afraid of front end databases?
Gil Fink
 
Web component driven development
Gil Fink
 
Web components
Gil Fink
 
Redux data flow with angular 2
Gil Fink
 
Biological Modeling, Powered by AngularJS
Gil Fink
 
Who's afraid of front end databases
Gil Fink
 
Biological modeling, powered by angular js
Gil Fink
 
Web components the future is here
Gil Fink
 
Ad

Recently uploaded (20)

PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 

End-to-End SPA Development using TypeScript

  • 1. BUILDING END-TO-END SPA USING TYPESCRIPT Gil Fink sparXys CEO
  • 2. About Me • sparXys CEO and senior consultant • ASP.NET/IIS Microsoft MVP in the last 6 years • Pro Single Page Application Development (Apress) co-author • 4 Microsoft Official Courses (MOCs) co-author • GDG Rashlatz and ng-conf Israel co-organizer
  • 3. Agenda • TypeScript? • Building a Simple App with TypeScript • Summary
  • 4. Wait! End to end JavaScript? Are you nuts?
  • 5. "JavaScript is the assembly language of the Web" Erik Meijer
  • 6. “You can write large programs in JavaScript. You just can’t maintain them” Anders Hejlsberg
  • 7. Some Alternatives • We have several alternatives: • Hard core JavaScript development • JavaScript preprocessors • CoffeeScript – http://coffeescript.org • Dart – http://dartlang.org • Clojurescript - https://github.com/clojure/clojurescript • Script# - http://scriptsharp.com/
  • 8. What is TypeScript? “TypeScript is a typed superset of JavaScript that compiles to plain JavaScript” ~typescriptlang.org
  • 10. TypeScript Key Features Support standard JavaScript code with static typing Encapsulation through classes and modules Support for constructors, properties and functions Interfaces and enums support Lambda and generics support Intellisense and syntax checking
  • 11. From TypeScript to JavaScript 11 class Greeter { greeting: string; constructor(message: string) { this.greeting = message; } greet() { return “Hi," + this.greeting; } } TypeScript Code JavaScript Code TypeScript Compiler var Greeter = (function () { function Greeter(message) { this.greeting = message; } Greeter.prototype.greet = function () { return “Hi," + this.greeting; }; return Greeter; })(); tsc.js
  • 12. TypeScript Type Annotations • You can add type annotations to variables and functions 12 var str: string = ‘hello’; // str is annotated as string function foo(name: string) : string { // parameter and function annotated return ‘hello’ + name; }
  • 13. Classes and Interfaces • You can define classes • You can define interfaces o And implement them later interface IGreeter { greet(): void; } class Greeter implements IGreeter{ greeting: string; greet() { console.log(this.greeting); } } var Greeter = (function () { function Greeter() { } Greeter.prototype.greet = function () { console.log(this.greeting); }; return Greeter; })();
  • 14. Modules • You define modules to wrap classes, interfaces and functionality • Use import and export keywords •module app { export interface IGreeter { greet(): void; } export class Greeter implements IGreeter { greeting: string; greet() { console.log(this.greeting); } } } var app; (function (app) { var Greeter = (function () { function Greeter() { } Greeter.prototype.greet = function () { console.log(this.greeting); }; return Greeter; })(); app.Greeter = Greeter; })(app || (app = {}));
  • 15. Classes, Modules and Interfaces Demo
  • 16. Building a Simple End-to-End App with TypeScript Demo
  • 18. Summary • Open source language that compiles into JavaScript • Key features: • Code encapsulation • Maintainable code • Tooling support • Learn TypeScript today!
  • 19. Resources • TypeScript – http://www.typescriptlang.org • TypeScript Source Code - https://github.com/Microsoft/TypeScript • Definitely Typed – https://github.com/borisyankov/DefinitelyTyped • My Website – http://www.gilfink.net • Follow me on Twitter – @gilfink