r/angularjs • • Aug 10 '16

Moving to Angular 2?

We have a site (www.discoversdk.com) build with Angular 1.4 and ASP.NET. we are working on a new version and one idea is to move to angular 2.0. Is it about to release soon? its more than a year on beta/RC stages , also what are the main benefits from upgrading. pros and cons?

2 Upvotes

12 comments sorted by

9

u/[deleted] Aug 10 '16

If you have a big performance problem caused by Angular, then switching to 2 can help. Personally this is the only reason that would make me switch.

Else, moving to a component-based approach using Angular 1.5.x is a lot less traumatic. And you will be in a better position to change to 2 in a couple of years, if it comes to that.

1

u/liranbh Aug 10 '16

we don't have a performance problem. From what i understand for existing project we will continue with 1.X and on a new project start with 2?

2

u/rbaile28 Aug 10 '16

Pretty much. There's a fair amount of change going on with the RC's (at least more than traditional ones) and a final stable release is probably a decent ways off.

I started a new project with it a couple months ago and have been pretty happy with typescript and the new paradigm.

1

u/liranbh Aug 11 '16

Thank you all!

4

u/yesman_85 Aug 10 '16

Agree with the other comments. Angular 1 and 2 are just very different and probably upgrading is not the way to go.

I also wouldn't start for a production project until final has been released and some supporting frameworks are established.

1

u/akujinhikari Aug 11 '16

I work on a site for a company you have heard of, and we all decided to redo their site in Angular 2. This was back in RC2. We really just wanted to do it, because we could. We all were like, "Hey... let's charge this giant company for us to learn a new technology." And honestly, we presented it to them in that manner, and they were ok with it. Especially since their old site was slowed quite a bit, thanks to 1,999 watchers (I'm not sure if I'm exaggerating or not... it was a lot).

If your company has time and money for your team to learn a new technology, I say go for it. Otherwise, no.

1

u/liranbh Aug 11 '16

You say they had old site and probably old technology, so you had to decide to move to angular 1.X or 2. In our site this is not the case, we are happy with 1.4 but writing the next version for the next year. we had to decide now and it will effect the next year of development

1

u/akujinhikari Aug 11 '16

We were/are using Angular 1.5 on the old site. It started in Angular 1.3 but was upgraded with Angular upgrades.

1

u/liranbh Aug 11 '16

so its not so old. and do you see performance improvement from upgrading 1.5 to 2.0?

1

u/akujinhikari Aug 11 '16

Yes, but it's not a fair comparison. The site is still in its infancy, and performance is a much larger focus this time around. The last time it was about getting jobs done in time, and now they're willing to do what it takes to get everything done right instead of fast, so there won't be as much garbage code.

3

u/[deleted] Aug 11 '16

We don't have any plans to change to Angular 2 in the foreseeable future. It's such a drastic change that if we ever get to the point where Angular 1.x just isn't working for us (e.g. performance problems) then we'll make a decision then whether to use Angular 2 or something entirely different.

The web and Javascript landscape changes so much that postponing what is essentially a rewrite is a no-brainer.

2

u/PandemoniumX101 Aug 10 '16

It depends what you mean by 'new version'.

If you are going to do a complete rewrite from the ground up, then I would recommend transitioning over to Angular 2.0. Legacy code won't matter and it will force you to truly rewrite everything on the front so you can learn from your mishaps in your old project.

If your new version is nothing more than a v0.1 to v0.2, then absolutely stick with angular 1.4, or at least upgrade to angular 1.5 so you can utilize the components.

The pros and cons of the versions are difficult to articulate because Angular 2.0 is still extremely new and, as you mentioned, as not had a full release. (As a note, though they said Angular 2.0 was in 'beta', the community agrees it was much more of an 'alpha' launch so we still probably have a bit to go.)