Live data from Hacker News

Angular 1 and Angular 2 integration: the path to seamless upgrade

angularjs.blogspot.com

21–30 of 102 posts

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#21

Earlier quoted context omitted.

Since Angular 2 was announced, I had the feeling that I picked the wrong framework for our product with Angular 1, and was feeling regrets about that choice towards my team, to have blocked them with a framework without future. Knowing that we'll be able to slowly move our app to Angular 2, one feature at a time, is certainly the best news I've had in a while.

BTW, why do I always feel like betting in a horse race when choosing a web framework/library? Hoping it'll be maintained long enough, hoping it'll not be deprecated after 6 months for the new cool kid...

This is true of any kind of component, in any language, that you don't maintain yourself. It's the nature of the thing: you don't have to build it yourself, and in exchange, you have less control over it.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#22
post #19

I see 2-way data-binding is mentioned here and will still be supported (good). Curious why has 2-way now become 'uncool' recently, e.g. React? 2-way is what got me excited about client side JS due to the code reduction in an average app. Is just that Angular 1's implementation was non-performant? (lots of other frameworks use it as well, e.g. Knockout, RactiveJS, etc).

Two way data binding is awesome and neat and shiny and chrome. It's also pretty slow; a lot of pragmatic angular work involves keeping the number of watchers firing during digest cycles minimized. If you have a lot of data that's all two-way-bound by default, but aren't making any use of the bindings, that's a lot of wasted cycles. I mean, my app has a lot of data in it, stuff like {{username}} which rarely ever changes in the model, so I don't really need two-way binding for it.

What I like here is that one-way binding is the default, and you can do two-way stuff if needs be, because sometimes it really is the best call.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#23
post #18

Earlier quoted context omitted.

BTW, why do I always feel like betting in a horse race when choosing a web framework/library? Hoping it'll be maintained long enough, hoping it'll not be deprecated after 6 months for the new cool kid...

I had always a bad feeling about angular. The first guy I heard talking about it was like "It was made by an underdog at google" and "We often had the feeling about hitting a dead end when developing with it, but it was always because we were using it wrong" which both sounded strange to me. I used ExtJS, Ember and React. And never switched away from them because it wasn't maintained anymore. It just happened that pe…

ExtJS went through some rough upgrade cycles as well. From what I remember, the 2->3 upgrade path covered a small subset of codebases.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#24
Why isn't there a single domain for the angular project?

From what I can see there seems to be 2 main ones: angular.io (for angular 2) and angularjs.org (for angular 1.x) as well as angulardart.org and other sites for angular material design (material.angularjs.org) and angular firebase (firebase.com/docs/web/libraries/angular/). Why not have a single site (or at least a main domain with corresponding subdomains) with similar documentation and navigation?

In addition, searching for "angular" in Google provides no obvious distinction between the different sites. For a Google sponsored project, I would have expected better attention to the search meta-data to make the distinction clear.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#25
post #6

For the curious, this is the official repository for the ng2-to-ng1 engine: https://github.com/ngUpgraders/ng-forward

ng-forward contributor here: that is not the ng2-to-ng1 engine. ng-forward is an Angular team sanctioned library for eventually enabling Angular 2 syntax in Angular 1. It shares a lot of goals with what is outlined in today's announcement but is more catered for teams that want to start an app today with the quickest possible migration strategy.

The code for the ng2-to-ng1 engine (called ng-upgrade) is either not public yet or will be at https://github.com/angular/angular

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#26
post #22
post #19

I see 2-way data-binding is mentioned here and will still be supported (good). Curious why has 2-way now become 'uncool' recently, e.g. React? 2-way is what got me excited about client side JS due to the code reduction in an average app. Is just that Angular 1's implementation was non-performant? (lots of other frameworks use it as well, e.g. Knockout, RactiveJS, etc).

Two way data binding is awesome and neat and shiny and chrome. It's also pretty slow; a lot of pragmatic angular work involves keeping the number of watchers firing during digest cycles minimized. If you have a lot of data that's all two-way-bound by default, but aren't making any use of the bindings, that's a lot of wasted cycles. I mean, my app has a lot of data in it, stuff like {{username}} which rarely ever chan…

Thanks. Yeah 1-way as default is reasonable. I suppose in my case I haven't seen performance issues due to data size, and also have taken to using RactiveJS which allows both 1-way and 2-way via [[someProp]] and {{someProp}}, respectively.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#27
post #5

I have been evaluating writing some new applications in Angular at work and was quickly turned away from it because before today the actual migration path seemed very unclear. Without a migration path, picking v1 for a new application at this point would be silly, and 2 is completely unready for production. Hearing that they are really planning on making it more or less "backwards compatible" is definitely a smart mo…

Since Angular 2 was announced, I had the feeling that I picked the wrong framework for our product with Angular 1, and was feeling regrets about that choice towards my team, to have blocked them with a framework without future. Knowing that we'll be able to slowly move our app to Angular 2, one feature at a time, is certainly the best news I've had in a while.

Stuff written against angular 1.x should be good for years to come. I'm still using 1.2.x for compatibility with ie8.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#28
post #18

Earlier quoted context omitted.

BTW, why do I always feel like betting in a horse race when choosing a web framework/library? Hoping it'll be maintained long enough, hoping it'll not be deprecated after 6 months for the new cool kid...

I had always a bad feeling about angular. The first guy I heard talking about it was like "It was made by an underdog at google" and "We often had the feeling about hitting a dead end when developing with it, but it was always because we were using it wrong" which both sounded strange to me. I used ExtJS, Ember and React. And never switched away from them because it wasn't maintained anymore. It just happened that pe…

I know what they mean when they say 'it was always because we were using it wrong'. Last place I worked used Angular 1 for their product reboot, and any time I hit a dead end I'd lookup the problem on stackoverflow only to find I wasn't doing things 'the angular way'. Generally this would be because I'd decided to mix in JQuery and alter some of the visual tree myself (something angular is meant to exclusively take care of).

At the end of the day, when you're writing commercial software in a big team you are inevitably going to have to join up technologies whether you or angular likes it or not. Angular 1 decided to make this a PITA, so I can't ultimately recommend it for use. I haven't looked into Angular 2 though.

Re: Angular 1 and Angular 2 integration: the path to seamless upgrade

#30
post #22
post #19

I see 2-way data-binding is mentioned here and will still be supported (good). Curious why has 2-way now become 'uncool' recently, e.g. React? 2-way is what got me excited about client side JS due to the code reduction in an average app. Is just that Angular 1's implementation was non-performant? (lots of other frameworks use it as well, e.g. Knockout, RactiveJS, etc).

Two way data binding is awesome and neat and shiny and chrome. It's also pretty slow; a lot of pragmatic angular work involves keeping the number of watchers firing during digest cycles minimized. If you have a lot of data that's all two-way-bound by default, but aren't making any use of the bindings, that's a lot of wasted cycles. I mean, my app has a lot of data in it, stuff like {{username}} which rarely ever chan…

I think two-way binding going by the way side because developers are tired of having to deal with unintended loop backs. You start having to add weird flags to your data to indicate that data changes were the result of user actions and not changes from the backend to avoid endless event loops. Two-way binding results in more code that's buggier whereas one-way binding with actions results in much more organized and understandable code with none of the unintended consequences.
Post reply on HN