Working with Angular 2 [closed]

TypeScript! Is it really needed to use typescript to gain better performance instead of writing plain simple JS code we’ve been doing all along. We’ve came across a few comments that says typescript helps in better performance.

TypeScript is about static analysis for better type-safety. It also has a pretty nice suite of editor tools (e.g. WebStorm). You don’t need it for performance. It’s more a tool for helping you author. Personally though, I love it.

I’ve begun migrating some of my existing open-source libraries to TypeScript because it’s so much easier to work with. For example, check out Task Runner before and after.

ES6 features. Since angular 2 will be using a lot of es6 features, would that mean we’ll have to wait for all the browsers support at least those features needed by angular 2 before we can kick start with it on our production applications.

A lot of ES6 features can be polyfilled. Check out

Web components. Since angular 2 provides the facility to create web components and I’ve came across a few blogs on creating your own (using polymer), how hard is it gonna be for our team to create them? Or is it better if we just stick to old directives creation thing ?

Web components are also polyfillable (see here). In this case, I’d suggest you follow the Angular team’s recommended practices for creating your components. Also perhaps keep an eye on what’s coming out of the Polymer team in this regard.

Performance. I’ve seen this video of Angular + React which provides a good comparison of angular vs angular + react vs angular 2. But I’m not sure if that’s the case that angular 2 is really fast all the way or if we can go ahead with building angular + react app to avoid waiting for angular 2 to stabilize or the browsers to have support for es6 features that angular uses.

This sounds to me like premature optimization. Build for (plain) Angular first and optimize only if you notice performance problems in particular parts of your application.

Leave a Comment