Slides from my talk on Supercharing your Javascript with TypeScript. It includes an intro to the current problems we face in JavaScript and describes how TypeScript can be used to develop enterprise-scale applications.
31. TypeScript –
ES6 compatibility table
TypeScript GitHub Repo
TypeScript Roadmap
Use TypeScript with Sublime
Use TypeScript with VS Code
Editor's Notes
JavaScript all the things! Who would have thought 5 years ago that JavaScript would be where it is today? The penetration that this language has seen is extraordinary. From the server to the client, today, we can write end-to-end applications solely in JavaScript. Every day, a new framework makes an appearance. This can be a bit worrying considering the origins of the language. JavaScript was developed in the 1995 by the Netscape team as an answer to Java. It only took 10 days to come up with the prototype but as we know, there's nothing more permanent than the temporary. It was supposed to be a quick solution and was never intended for use in production. The original expectation was that no applications will have more than a couple of hundred of lines of JavaScript code.
Going back to where we left off. We all know that JavaScript has won the war. Many will agree that if we had the chance to do it all over again, we wouldn't come up with JavaScript again. This is not the dream language for the web. Yes, JavaScript isn't perfect but we still managed to write beautiful functional application with 100s if not millions of lines of JavaScript code:
Gmail
Atom
VsCode
Brackets
Netflix
Slack
Wallmart
And many more
There's nothing wrong with that. In fact we use worse programming languages to write applications today - VB.NET anyone? Yes I said it! The biggest problem that JavaScript faces today is that it was never designed for enterprise-scale development. Over the years we created design patterns for designing efficient and reusable JavaScript code. Yet, we are still facing challenges when it comes to writing enterprise-scale applications using JavaScript.
- Refactoring is incredibly difficult
- There's lack of basic building components such as classes, interfaces
- Static typing is not available as JavaScript is very dynamic
Go to definition, renaming, find all definitions etc are also inexistent.
BARCLAYS EXAMPLE
TypeScript was created by Anders Hejlsberg (halsberg) ,
The creator of C# (in .NET). Typescript is the result of feedback received by the community that indicated that writing large scale applications with JavaScript is hard. It started originally as an internal project in 2010, until it was publicly released in 2012.
TypeScript is designed to supplement and improve JavaScript by providing the missing features and great tooling without, at the same time, compromising the basis of JavaScript which is that it can run anywhere, any OS any browser. It is based on ECMAScript5 but is forwards compatible with ECMAScript6.
TypeScript is designed to supplement and improve JavaScript by providing the missing features and great tooling without, at the same time, compromising the basis of JavaScript which is that it can run anywhere, any OS any browser. It is based on ECMAScript5 but is forwards compatible with ECMAScript6.