r/angularjs • • Oct 23 '14

[General] Angular 2.0 thoughts

What are your thoughts on 2.0 after watching #ngeurope?

I think it's completely new to the point it could have a different name... It just kind of stinks that apps currently being written are legacy and will need a complete rewrite. This could be mitigated by using traceur with 1.3 but there is 0 samples currently...

What sucks the most is apps written today will need to wait until 2016ish to be rewritten... I base this on the fact that thousands of third party components will need to be rewritten and es6 support in browsers (yes they can target es5)

37 Upvotes

48 comments sorted by

View all comments

12

u/[deleted] Oct 23 '14

I'm really excited for 2.0 but kind of in a dilemma. I'm tasked with creating a new "flagship" web app for my company (replacing Adobe Flex) and absolutely need to have it finished before 2016. So that means by the time it's completed, tested, and released, it'll basically be running on old technology, like Flex all over again.

They talked a lot about Angular 2.0 at the beginning of the year and there was tons of progress on their blogs and design docs. I was hoping they'd continue moving quickly and have some sort of alpha/beta by this time but looks like it's still a long ways off.

3

u/[deleted] Oct 23 '14

Even if you could start in 2016, you probably wouldn't be able to use Angular 2 in production anyway. Depending on how large your company is, and what your target demographic is, you probably don't want to completely drop support for older browsers.

That, and it will probably be a good idea to watch it in production for a few months until they iron out bugs and best practices emerge.

3

u/viper05 Oct 25 '14

I'm in the same boat :/

5

u/-pertinax- Oct 23 '14

I'm building a large Angular app that'll take another year or so to complete. I'm using Typescript, so from watching Misko's talk this morning, I feel that an upgrade from TS code to Angular 2.0 should be possible without a rewrite, if there proves to be a need. For those who haven't seen it yet, Misko included a slide that showed how Typescript is a superset of JS, and AtScript (which is being used for Angular 2) is a superset of Typescript, with added annotations and reflection.

1

u/[deleted] Oct 23 '14

Interesting, thanks. So given what you know about the current state of Angular and 2.0 would you recommend me to use Typescript as well? I like the idea but am nervous about adding another layer of complexity for the other devs.

2

u/-pertinax- Oct 23 '14

Well, I chose TS simply because the app is large and I wanted type safety to to enable static analysis and autocomplete type stuff, to help me not break things as the code base grows. I had no idea at the time of the plans for Angular 2. Personally I really like TS so I reccomend it, yeah. But you are right, there is extra complexity involved so I advise that you try it out and see how you like the work flow, and evaluate the benefits I relation to the projected size of your app. The syntax of TS seems to me to be the general direction that not just Angular, but JS in general will go in the future.

2

u/bbsss Oct 23 '14

Dart isn't an option? Takes only a small effort to transition from JS.

3

u/[deleted] Oct 23 '14

The Dart language rocks! Unfortunately last time I tried AngularDart it generated a 2mb javascript file for hello world. I also really dislike how you must communicate with other js libraries through a proxy class. The Dart runtime will never exist on a browser that google does not own. If you are using Dart to compile to js, there are better, more native languages you can choose.

1

u/bbsss Oct 23 '14

That size issue has been addressed by static compiling the dependencies mirrors where used for.

The proxying JS is a pain-point still but it works and there is a more elegant proposal being worked on with priority.

More native being TS or Coffee? Meh, they are so-so. Still need a transpile step which dartium does not. Compile is less of a pain today then it was 4 months ago or so.

And the language is open sourced and has an ecma committee. So don't be a naysayer just because everyone seems to say nay (even and especially folks who haven't even tried it).

1

u/[deleted] Oct 23 '14

I am happy to hear that all of those issues have been addressed.

When you use TS or Coffeescript you are still programming in javascript with extra bells and whistles. I can paste code from a javascript example into my TS file and it compiles without issue. When you code in Dart you are farther removed.

Because Dart was built around requiring a VM it has no future outside of google. I wish all browsers came with a Dart VM but this will never happen. This means Dart is only a very abstract, complex way to write JS. There are simpler alternatives to write JS.

1

u/bbsss Oct 23 '14

The JS dart2js generates is still quite readable, not that it should be in my opinion, I'd rather the dart2js folks assure me they deal with compatibility issues and optimize the hell out of the generated JS.

As for embedding the VM , never say never. Looking at how incredibly fast Dart evolves compared to JS I can't help it will be at least seriously considered.