SlideShare a Scribd company logo
1 of 26
TYPESCRIPT
JS CODING JUST GOT BETTER!
ABOUT ME
Amit Bezalel
• UFT & SRF System Architect
• Wrote: C++, Java, C#, JavaScript, now Typescript
• Recently read up on a ton of cloud architecture
• Some articles on codeproject and HP Blog
Amit.Bezalel@hpe.com
JAVASCRIPT
On May 1995 a Netscape dev created a new programming language
It took him 10 days
It was called Mocha internally
Then LiveScript
And eventually JavaScript
20 years later it’s the hottest language on the planet !
JAVASCRIPT IS HERE TO STAY
Good things in JS:
• The language of the browser
• Widely used for Micro-Services
• A Large community
• A full stack language (Server + UI)
• Very flexible
• Asynchronous
Stack
overflow
2016
JAVASCRIPT IS HERE TO STAY
Some bad things:
• No block scope
• Over-flexible function definitions
• No interfaces
• Typing confusions
• Performance pitfalls
• The ‘this’ variable
• Semicolon auto completion
TS IMPROVES JS
TS Solutions:
• [√] No block scope
• [√] Over-flexible function definitions
• [√] No interfaces
• [√] Typing confusions
• [√] Performance pitfalls
• [√] The ‘this’ variable
• [x] Semicolon auto completion
WHY NOT TYPESCRIPT?
Common complaints I heard:
• Adds a compilation step
• you will have a build process anyway
• Relies on Microsoft
• MS proved itself with C#
• Doesn’t prevent JS pitfalls
• Many of them are prevented (as we saw)
• The price of keeping JS flexibility
• The illusion of safety, but still JS
• IMHO it is actually more safe given that you use types
• OO constructs may be abused
• This also goes for Java / C#
IT’S TRENDY
• TS surpasses all other
JS pre-compilers
• TS also passed SASS
which is widely used.
• Fast growing trend line,
indicating exponential
growth in 2016
WHO USES TS
SOME QUOTES
There are Many blogs about TS, here are some quotes:
• Angular 2.0: “typescript makes code easier to read and
understand”
• Telerik: “TypeScript may be the best of the many JavaScript front
ends”
(even though he didn’t want to use it at the end)
• Wix: “TypeScript generates JavaScript code that is easy to read
and debug”
• Asana: “static typing allows us to skip checks that would
otherwise be required at runtime”
• Microsoft:
• VS Code – An IDE Written in Typescript for Typescript
• The TS compiler itself is also written in TS (wikipedia)
WHAT IS ADDED TO JS?
• Features:
• An optional type system
• ES6, ES7 features
• Adds missing OO features
• Compilation
• Compile to any ES flavor (ES3 / ES5 / ES6)
• Fast compilation
• IDE Support:
• Good Code completion (Intellisence)
• Wide adoption in modern IDEs
• Better navigation and readability (jump to def, refactoring)
THE TS PROJECT
• Opensource (github)
• Apache 2.0 license
• https://github.com/Microsoft/TypeScript
• TS is Written in TS:
• https://github.com/Microsoft/TypeScript/tree/master/src/compiler
• Live community (bugs / suggesstions / pull requests)
• https://visualstudio.uservoice.com/forums/293070-visual-studio-code
LANGUAGE FEATURES
• Basic Types
• Classes (Inheritance, private members)
• Interfaces
• Generics
• Enums
• Mixins
• Let
• Async await
• Arrow functions (obj) => {}
• Modules
• Parameter default values
ES5 / ES3 GENERATION
ES6 GENERATION
TYPESCRIPT IDE SUPPORT
TS Code
completio
n
TS
Debugger
IDE
Performan
ce
Cross
platfor
m
Maturity Release &
activity
Needs
proj /
sln files
VS Code Excellent Good Excellent Yes v1.0 Monthly no
IntelliJ
14+
Webstor
m
Ok Good Ok (high
RAM)
Yes Mature Every
Several
months
no
Visual
studio
2013+
Good Good Bad (For
large TS
projects)
No Mature 3 months yes
Eclipse
TypEcs
Ok Ok Ok Yes v1.0 no recent
activity, 6
months
no
WHAT IS VSCODE?
• A new fully featured IDE from Microsoft
• Very lightweight
• MIT licensed opensource in GitHub
• Cross platform (mac/ linux /windows)
• Written over electron (V8 desktop platform)
• Everything is code (including project settings)
• Released v1.0 five days ago!
• A new release each month
• Huge amount of features in each release
• 500,000 users and counting
Releases blog:
https://code.visualstudio.com/blogs
COMMONJS & TYPINGS
• Importing npm modules
• Using import / var with require
• Getting type information for npms
• d.ts files
• Definitely typed git repo (ambient)
• Old reference comments (tsd) vs. new (typings) method
• Keeping types across files / modules
• Auto generated typing files (d.ts)
• Installing types from original repo
• The typings install commandline
OUR STORY
• Started out with Pure NodeJS 2~4
• Added some more people ~6
• JS Code is hard to understand…
• Moved to TS
• Now we are ~18 and growing!
• Using typescript in UI side as well as backend
• 20+ micro services in our architecture
• Using both intelliJ 15 & VSCode (dev’s choice)
OUR CONCLUSIONS
Our Cons:
- Smallish learning curve
- Mixing JS / TS possible, problematic inheritance
Our Pros:
+ Readability and code navigation increased
+ Refactoring & Code completion
+ Types are important
+ Classes and interfaces give structure
+ TS Scales, new team members benefit
MICRO SERVICES
• Decoupled, services
• Single responsibility
• Independent technology stacks
• Communication via Rest / WS APIs
• Swagger definitions
Typescript benefits:
• Swagger definitions can be generated from classes (including
types)
• Function signature checking adds interface enforcement
TS WITH NODEJS
Benefits:
• Rest body definitions can be generated from object definitions
• Code completion helps keep the correct structures
• Types are enforced for incoming data
Stack
overflow
2016
WEB UI & TYPESCRIPT
• Angular 2.0 is written in TypeScript
• You get up to date definitions
• Angular tools are ready for TS usage
• Typescript debugging in browser (via mapping & IDE extension)
• A short learning curve (close to JS)
WHAT’S NEXT
The future of typescript (v2.0):
• ReadOnly & abstract Properties
• Async / await support for ES5/ES3 generation
• Private/protected constructors
• Type definition for “this”
• Runtime Type checking for properties
• Much more…
Links:
• https://github.com/Microsoft/TypeScript/wiki/Roadmap

More Related Content

What's hot

Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScriptOffirmo
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersLaurent Duveau
 
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...QAFest
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersLaurent Duveau
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!Alessandro Giorgetti
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type scriptRemo Jansen
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Bibby Chung
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyRick van den Bosch
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript FundamentalsSunny Sharma
 
Pi j1.1 what-is-java
Pi j1.1 what-is-javaPi j1.1 what-is-java
Pi j1.1 what-is-javamcollison
 
Typescript - MentorMate Academy
Typescript - MentorMate AcademyTypescript - MentorMate Academy
Typescript - MentorMate AcademyDimitar Danailov
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponLaurent Duveau
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScriptGil Fink
 
Java script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming LanguageJava script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming LanguageKimsea Sok
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJSFestUA
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introductionBob German
 

What's hot (20)

Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...
QA Fest 2016. Роман Горин. Введение в системы распознавания речи глазами тест...
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
 
TypeScript intro
TypeScript introTypeScript intro
TypeScript intro
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacy
 
TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
Pi j1.1 what-is-java
Pi j1.1 what-is-javaPi j1.1 what-is-java
Pi j1.1 what-is-java
 
Typescript - MentorMate Academy
Typescript - MentorMate AcademyTypescript - MentorMate Academy
Typescript - MentorMate Academy
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret Weapon
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScript
 
Java script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming LanguageJava script fundamental - Introduction to JavaScript Programming Language
Java script fundamental - Introduction to JavaScript Programming Language
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introduction
 
TypeScript
TypeScriptTypeScript
TypeScript
 

Viewers also liked

Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascriptAndrei Sebastian Cîmpean
 
Typescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentTypescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentJoost de Vries
 
Double page spread stages powerpoint
Double page spread stages powerpointDouble page spread stages powerpoint
Double page spread stages powerpointkittylantos
 
Những bệnh cần khám ở phụ nữ trên 70
Những bệnh cần khám ở phụ nữ trên 70Những bệnh cần khám ở phụ nữ trên 70
Những bệnh cần khám ở phụ nữ trên 70vicente464
 
Pernicious Influence - Marked As Disciples series
Pernicious Influence - Marked As Disciples seriesPernicious Influence - Marked As Disciples series
Pernicious Influence - Marked As Disciples seriesCrossPointBible
 
Watch For Jesus' Return - STAY AWAKE!
Watch For Jesus' Return - STAY AWAKE!Watch For Jesus' Return - STAY AWAKE!
Watch For Jesus' Return - STAY AWAKE!CrossPointBible
 
Rich Goidel Infographic
Rich Goidel InfographicRich Goidel Infographic
Rich Goidel InfographicRich Goidel
 
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...Scholastica Sylvan Kimaryo
 
Carbon Fee and Dividend ICC Rotary
Carbon Fee and Dividend ICC RotaryCarbon Fee and Dividend ICC Rotary
Carbon Fee and Dividend ICC RotaryTimothy Dec
 
MI SIRB SQ K.JHA OSA.
MI SIRB SQ K.JHA OSA.MI SIRB SQ K.JHA OSA.
MI SIRB SQ K.JHA OSA.KAMAKHYA JHA
 
Don't Assume You're Creating Value - Prove it!
Don't Assume You're Creating Value - Prove it!Don't Assume You're Creating Value - Prove it!
Don't Assume You're Creating Value - Prove it!Mathias Eifert
 
Vat and international trade ukti internal nov14
Vat and international trade ukti internal nov14Vat and international trade ukti internal nov14
Vat and international trade ukti internal nov14taxadvicedirect
 

Viewers also liked (20)

Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
 
TypeScript DevSum 2013
TypeScript DevSum 2013TypeScript DevSum 2013
TypeScript DevSum 2013
 
Typescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentTypescript: enjoying large scale browser development
Typescript: enjoying large scale browser development
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Double page spread stages powerpoint
Double page spread stages powerpointDouble page spread stages powerpoint
Double page spread stages powerpoint
 
Những bệnh cần khám ở phụ nữ trên 70
Những bệnh cần khám ở phụ nữ trên 70Những bệnh cần khám ở phụ nữ trên 70
Những bệnh cần khám ở phụ nữ trên 70
 
Pernicious Influence - Marked As Disciples series
Pernicious Influence - Marked As Disciples seriesPernicious Influence - Marked As Disciples series
Pernicious Influence - Marked As Disciples series
 
cir vita Dec2015
cir vita Dec2015cir vita Dec2015
cir vita Dec2015
 
Watch For Jesus' Return - STAY AWAKE!
Watch For Jesus' Return - STAY AWAKE!Watch For Jesus' Return - STAY AWAKE!
Watch For Jesus' Return - STAY AWAKE!
 
The Amazing Gospel!
The Amazing Gospel!The Amazing Gospel!
The Amazing Gospel!
 
Rich Goidel Infographic
Rich Goidel InfographicRich Goidel Infographic
Rich Goidel Infographic
 
CV - VAC-JUL 2015
CV - VAC-JUL 2015CV - VAC-JUL 2015
CV - VAC-JUL 2015
 
Erfa- kursusbevis
Erfa- kursusbevisErfa- kursusbevis
Erfa- kursusbevis
 
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...
MY AFRICAN DREAM OF CREATING HAPPIER HEALTHIER MORE EFFICIENT & EFFECTIVE CIT...
 
Carbon Fee and Dividend ICC Rotary
Carbon Fee and Dividend ICC RotaryCarbon Fee and Dividend ICC Rotary
Carbon Fee and Dividend ICC Rotary
 
MI SIRB SQ K.JHA OSA.
MI SIRB SQ K.JHA OSA.MI SIRB SQ K.JHA OSA.
MI SIRB SQ K.JHA OSA.
 
RelazioneENG
RelazioneENGRelazioneENG
RelazioneENG
 
Don't Assume You're Creating Value - Prove it!
Don't Assume You're Creating Value - Prove it!Don't Assume You're Creating Value - Prove it!
Don't Assume You're Creating Value - Prove it!
 
Ervarings compleet C V 03-5-2015
Ervarings compleet C V  03-5-2015Ervarings compleet C V  03-5-2015
Ervarings compleet C V 03-5-2015
 
Vat and international trade ukti internal nov14
Vat and international trade ukti internal nov14Vat and international trade ukti internal nov14
Vat and international trade ukti internal nov14
 

Similar to TS CODING JUST GOT BETTER WITH THESE KEY BENEFITS

TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseSteve Reiner
 
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 appsdevObjective
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGil Fink
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript Corley S.r.l.
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Ethan Ram
 
End to-end apps with type script
End to-end apps with type scriptEnd to-end apps with type script
End to-end apps with type scriptGil Fink
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNativeMichał Taberski
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type scriptGil Fink
 
2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar seriesOpen Mainframe Project
 
Introduction_to_NET.ppt
Introduction_to_NET.pptIntroduction_to_NET.ppt
Introduction_to_NET.pptDarwin Terraza
 
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
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)Igor Talevski
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done rightWekoslav Stefanovski
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponLaurent Duveau
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent Biret
 

Similar to TS CODING JUST GOT BETTER WITH THESE KEY BENEFITS (20)

TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
 
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
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript Language
 
Node ts1
Node ts1Node ts1
Node ts1
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript
 
AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
 
End to-end apps with type script
End to-end apps with type scriptEnd to-end apps with type script
End to-end apps with type script
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNative
 
One language to rule them all type script
One language to rule them all type scriptOne language to rule them all type script
One language to rule them all type script
 
2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series
 
Introduction_to_NET.ppt
Introduction_to_NET.pptIntroduction_to_NET.ppt
Introduction_to_NET.ppt
 
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
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret Weapon
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 

Recently uploaded

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Recently uploaded (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

TS CODING JUST GOT BETTER WITH THESE KEY BENEFITS

  • 2. ABOUT ME Amit Bezalel • UFT & SRF System Architect • Wrote: C++, Java, C#, JavaScript, now Typescript • Recently read up on a ton of cloud architecture • Some articles on codeproject and HP Blog Amit.Bezalel@hpe.com
  • 3. JAVASCRIPT On May 1995 a Netscape dev created a new programming language It took him 10 days It was called Mocha internally Then LiveScript And eventually JavaScript 20 years later it’s the hottest language on the planet !
  • 4. JAVASCRIPT IS HERE TO STAY Good things in JS: • The language of the browser • Widely used for Micro-Services • A Large community • A full stack language (Server + UI) • Very flexible • Asynchronous Stack overflow 2016
  • 5. JAVASCRIPT IS HERE TO STAY Some bad things: • No block scope • Over-flexible function definitions • No interfaces • Typing confusions • Performance pitfalls • The ‘this’ variable • Semicolon auto completion
  • 6. TS IMPROVES JS TS Solutions: • [√] No block scope • [√] Over-flexible function definitions • [√] No interfaces • [√] Typing confusions • [√] Performance pitfalls • [√] The ‘this’ variable • [x] Semicolon auto completion
  • 7. WHY NOT TYPESCRIPT? Common complaints I heard: • Adds a compilation step • you will have a build process anyway • Relies on Microsoft • MS proved itself with C# • Doesn’t prevent JS pitfalls • Many of them are prevented (as we saw) • The price of keeping JS flexibility • The illusion of safety, but still JS • IMHO it is actually more safe given that you use types • OO constructs may be abused • This also goes for Java / C#
  • 8. IT’S TRENDY • TS surpasses all other JS pre-compilers • TS also passed SASS which is widely used. • Fast growing trend line, indicating exponential growth in 2016
  • 10. SOME QUOTES There are Many blogs about TS, here are some quotes: • Angular 2.0: “typescript makes code easier to read and understand” • Telerik: “TypeScript may be the best of the many JavaScript front ends” (even though he didn’t want to use it at the end) • Wix: “TypeScript generates JavaScript code that is easy to read and debug” • Asana: “static typing allows us to skip checks that would otherwise be required at runtime” • Microsoft: • VS Code – An IDE Written in Typescript for Typescript • The TS compiler itself is also written in TS (wikipedia)
  • 11.
  • 12. WHAT IS ADDED TO JS? • Features: • An optional type system • ES6, ES7 features • Adds missing OO features • Compilation • Compile to any ES flavor (ES3 / ES5 / ES6) • Fast compilation • IDE Support: • Good Code completion (Intellisence) • Wide adoption in modern IDEs • Better navigation and readability (jump to def, refactoring)
  • 13. THE TS PROJECT • Opensource (github) • Apache 2.0 license • https://github.com/Microsoft/TypeScript • TS is Written in TS: • https://github.com/Microsoft/TypeScript/tree/master/src/compiler • Live community (bugs / suggesstions / pull requests) • https://visualstudio.uservoice.com/forums/293070-visual-studio-code
  • 14. LANGUAGE FEATURES • Basic Types • Classes (Inheritance, private members) • Interfaces • Generics • Enums • Mixins • Let • Async await • Arrow functions (obj) => {} • Modules • Parameter default values
  • 15. ES5 / ES3 GENERATION
  • 17. TYPESCRIPT IDE SUPPORT TS Code completio n TS Debugger IDE Performan ce Cross platfor m Maturity Release & activity Needs proj / sln files VS Code Excellent Good Excellent Yes v1.0 Monthly no IntelliJ 14+ Webstor m Ok Good Ok (high RAM) Yes Mature Every Several months no Visual studio 2013+ Good Good Bad (For large TS projects) No Mature 3 months yes Eclipse TypEcs Ok Ok Ok Yes v1.0 no recent activity, 6 months no
  • 18. WHAT IS VSCODE? • A new fully featured IDE from Microsoft • Very lightweight • MIT licensed opensource in GitHub • Cross platform (mac/ linux /windows) • Written over electron (V8 desktop platform) • Everything is code (including project settings) • Released v1.0 five days ago! • A new release each month • Huge amount of features in each release • 500,000 users and counting Releases blog: https://code.visualstudio.com/blogs
  • 19. COMMONJS & TYPINGS • Importing npm modules • Using import / var with require • Getting type information for npms • d.ts files • Definitely typed git repo (ambient) • Old reference comments (tsd) vs. new (typings) method • Keeping types across files / modules • Auto generated typing files (d.ts) • Installing types from original repo • The typings install commandline
  • 20.
  • 21. OUR STORY • Started out with Pure NodeJS 2~4 • Added some more people ~6 • JS Code is hard to understand… • Moved to TS • Now we are ~18 and growing! • Using typescript in UI side as well as backend • 20+ micro services in our architecture • Using both intelliJ 15 & VSCode (dev’s choice)
  • 22. OUR CONCLUSIONS Our Cons: - Smallish learning curve - Mixing JS / TS possible, problematic inheritance Our Pros: + Readability and code navigation increased + Refactoring & Code completion + Types are important + Classes and interfaces give structure + TS Scales, new team members benefit
  • 23. MICRO SERVICES • Decoupled, services • Single responsibility • Independent technology stacks • Communication via Rest / WS APIs • Swagger definitions Typescript benefits: • Swagger definitions can be generated from classes (including types) • Function signature checking adds interface enforcement
  • 24. TS WITH NODEJS Benefits: • Rest body definitions can be generated from object definitions • Code completion helps keep the correct structures • Types are enforced for incoming data Stack overflow 2016
  • 25. WEB UI & TYPESCRIPT • Angular 2.0 is written in TypeScript • You get up to date definitions • Angular tools are ready for TS usage • Typescript debugging in browser (via mapping & IDE extension) • A short learning curve (close to JS)
  • 26. WHAT’S NEXT The future of typescript (v2.0): • ReadOnly & abstract Properties • Async / await support for ES5/ES3 generation • Private/protected constructors • Type definition for “this” • Runtime Type checking for properties • Much more… Links: • https://github.com/Microsoft/TypeScript/wiki/Roadmap

Editor's Notes

  1. Command line compilation (tsc) Intellisence demo (Vscode completion) Typings system + Ambient for JS projects Code intellisence JS interoperability, and optionality of types Debugging in TS IDE parsing & Compilation Errors Debugging the *.ts files via mapping