Hacker News new | ask | show | jobs
by kgreene2 3265 days ago
Did they really "just drop the old one"? Angular 2 was announced over 2 years ago, and initially was released 10 months ago.

Meanwhile, Angular 1 has continued to receive support this entire time, with the latest release 11 days ago and the latest merge to master being 4 days ago.

And, if you're on Angular 1 and want to upgrade, they've published an official migration guide.

1 comments

No, they didn't. In fact, they just recently released 1.6.5, yet another in a stream of maintenance updates to the old-generation 1.x branch.

Technical rants are one of the reasons I enjoy reading this website, and lot of people here like to shit on Angular. But it seems to me the reasons aren't usually technical, they are more techno-political or ford-vs-chevy type arguments.

The term "over-engineered" is often thrown out there, and while that's a hard-to-quantify subjective judgement, it does kind of fit. There are many features in Angular, which do lots of things for you, but at the cost of added complexity and a steeper learning curve.

But one of the good aspects of being "over-engineered" is the incredibly long sunset window for Angular 1.x (the previous, and largely incompatible generation; 2.x onwards is "current generation").

Maintenance releases to 1.x keep coming out, some of which (1.5) add a bunch of new stuff that makes it easier to modernize your design even under the old framework, and to port your legacy 1.x code to modern Angular when the time comes.

Also, there's an well-documented upgrade path, and (importantly!) an officially supported library (ngUpgrade) that lets you make a gradual transition to modern angular, where your old code runs in Angular 1.x, new components run in modern Angular, ngUpgrade helps integrate the two worlds in a single app in the browser. So you can do a component-by-component migration of a production app over years.

As a native app developer (and not a fan of JavaScript) who nevertheless last year joined a team that also has to maintain an old, in-production, customer-facing Angular 1.x app, I really like all these "over-engineered" features.

That's not to say I love every single thing about Angular but I think a.) it's pretty good, b.) modern version is better than the old one and going in the right direction, and c.) lots of the complaints are more like "they fucked up the upgrade process from 1.x" (they did) or "Google sux brah" (whatever).

ngUpgrade is kind of a joke in practice. Most 1 to 4 migrations end up being total rewrites.
Interesting. Is that first-hand experience? If so, what are some of the issues?
Yes. We built out a lot of NG1 components at my company and are currently building a product in NG4. The issues are, for example, the template syntax is completely different. That has to be mapped over. There is no $scope and the component lifecycle is completely different in NG4. Depending on how you stored state, responded to state, and depending on which ngDirectives you used...there may or may not be a direct mapping with concepts for NG4. Also, if you have any testing in place at all, those tests will likely need to be rewritten.

NG4 components depend on RxJS, for example...but Angular 1 had no such concept. SystemJS modules are a thing in Angular 4...but not in Angular 1. You may or may not have ES6 modules in your Angular 1 code base...but you definitely have them in your Angular 4 code base. There are so many differences that "upgrading" to Angular 4 is really just a rewrite in practice. And it's no less effort for you to migrate to React or Vue in a piecewise manner.