Following the release of Angular 2 Beta, like many other front-end developers currently using AngularJS, I became very interested in what the transition from Angular 1 to 2 would be and how it might impact what I am working on right now.
Right away I had many questions! I just wrapped my head around AngularJS and now I have to switch to Angular 2?! How is it better? Will I be able to easily convert what I’ve already written? When will it get out of Beta? Who is really going to use it? How much support will I have if I attempt to start my move to Angular 2 now?
Why Learn TypeScript?
These questions inspired me to do extensive research. Like I said before, many developers are excited about Angular 2, so there are many articles and other peoples thoughts to read through and compare. Many articles later, I realized I really needed to begin by learning TypeScript, since Angular 2 itself is written in it. So I looked into the basics, enough to build an application and start playing with the code.
Dirk started the talk by saying that TypeScript is really well suited for large development. Using the technologies available today, “hands in the code” really becomes an issue sometimes, especially in a large project or on a large team. Even when the amount of developers isn’t an issue, we must still maintain clean code.
Starting to Like the Idea of Using TypeScript
Optional static typing is available. What this means is you, as the developer, have the ability to set the “type” of data your variable is going to hold and that type is then verified on compilation. This allows many bugs to be caught early and is a great start for program verification.
Using static typing, code becomes easier to maintain; you can quickly integrate new developers into your team and bring them up-to-speed with the code; it’s also much less likely for a team member to misuse code. The power of TypeScript comes from the ability to use static typing.
- It supports ES6, as well as compiles to older ECMAScript standards if needed.
- Excellent IDE support such as Visual Studio, Sublime and IntelliJ, among others. The development experience is greatly improved because the IDE knows what is allowed and what is not. Because of this support, compilation errors can be displayed within the IDE. This will reduce the amount of time spent getting your code to work!
- It is Open Source and is supported by Microsoft. TypeScript has seen great activity.
- Angular 2, as well as some other great projects such as RxJs, is coded using TypeScript.
So using TypeScript is a good idea. I’ll have to dive more into Angular 2 to really understand all the questions I still have. I’ll plan to cover answers to those questions in future posts, coming soon!
Main TypeScript Site – http://www.typescriptlang.org/
Basic TypeScript Quick Start Guide – http://www.typescriptlang.org/docs/tutorial.html
Main TypeScript Github – https://github.com/Microsoft/TypeScript
Great TypeScript Resources Github – https://github.com/dzharii/awesome-typescript
Main Angular2 Site – https://angular.io/
Basic Angular2 Quick Start Guide – https://angular.io/docs/ts/latest/quickstart.html
Main Angular2 Github – https://github.com/angular/angular
Fun Sites Built to Angular2 – http://angularexpo.com/