Live data from Hacker News

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

angularjs.blogspot.com

71–80 of 102 posts

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

#71
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 bindings are awesome for demos.

They tend to introduce a fair amount of unnecessary complexity in real world applications. Especially if you have to deal with changes that don't happen in real time or intermediate states or two different formats of presentation for the same data.

The workaround for two way bindings in React is relatively easy compared to the kind of hoops you have to jump through when you start with two way bindings and have to backtrack because of pesky real world requirements.

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

#72
post #39

Earlier quoted context omitted.

Browsers and JavaScript have changed quite a bit since 2009. You couldn't have created something like Angular 2 6 years ago or even 2 years ago for that matter. Angular 2 is possible today thanks to technological advancements.

For example?

for example like quantum chips, neural nets and big data are all now buzz words that changed the technology of javascript forever.

Seriously though, if anything has changed it's ES6, and that doesn't count as it's all sugar that compiles back to ES5.

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

#75
post #39

Earlier quoted context omitted.

Browsers and JavaScript have changed quite a bit since 2009. You couldn't have created something like Angular 2 6 years ago or even 2 years ago for that matter. Angular 2 is possible today thanks to technological advancements.

For example?

For one, it's written in TypeScript. There is one codebase for ES5/6, TypeScript, and Dart. A big benefit of Angular 2 is the better tooling you get with TypeScript and Dart.

It uses things like classes, decorators, and the tag. It uses a virtual DOM, which is still a fairly new concept. It can run in Web Workers and you can even use it for native applications which do not have a regular DOM.

It really is quite different from anything one could have started back in 2009. Even those odd-looking attribute might have not worked because HTML5, which specified a lot of those things more precisely, was far from being done.

Angular 1.x made pretty good use of the things which were available at the time.

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

#76
post #18

Earlier quoted context omitted.

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.

Angular is my 'plan b' while I continue working with ExtJS.

Last December I coded up just enough of an app in Angular to ensure that my Sencha-focused Flask app would work with another JS framework should the need ever arise. I'd hate to have to go that route of course (even if Sencha changes hands), but it's nice to have options.

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

#77
post #37

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...

We used to live in a world where Moore was the name of a law and our libraries changed every second year. Maybe we're reaching a plateau and we've found the right way to do things. Maybe the set of js libraries we know today is close to the final set , the ideal toolbox of a front-end developer. Maybe the next huge development of IT is the cloud, deep learning and Cortana, and maybe since the desktop/mobile power isn…

It's got nothing to do with Moore and everything to do with the collective fingers being pulled out of bums by the standards committees and finally adding new features to js after 10 odd years of stagnation.

And given javascript is still way behind the other languages at the moment, javascript libraries still have a lot of settling down to do.

For example, one of the big problem with javascript was specifically that there was no way to watch for property changes, so all sorts of crazy strategies were adopted, like getters and setters as methods, or scanning all registered objects for changes. But they all suck and force you to write crappy code. As new ES features are adopted, less of these dirty hacks are needed but they cause major changes in libraries.

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

#78
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…

{{username}} is a one-way-binding. Two-way-binding happens only with ng-model and = on isolate scopes.

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

#79
post #37

Earlier quoted context omitted.

We used to live in a world where Moore was the name of a law and our libraries changed every second year. Maybe we're reaching a plateau and we've found the right way to do things. Maybe the set of js libraries we know today is close to the final set , the ideal toolbox of a front-end developer. Maybe the next huge development of IT is the cloud, deep learning and Cortana, and maybe since the desktop/mobile power isn…

It's got nothing to do with Moore and everything to do with the collective fingers being pulled out of bums by the standards committees and finally adding new features to js after 10 odd years of stagnation. And given javascript is still way behind the other languages at the moment, javascript libraries still have a lot of settling down to do. For example, one of the big problem with javascript was specifically that…

+1 for Proxy() :)

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

#80
post #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) wit…

Part of the reason is so that they can track usage trends to see how long they should continue supporting Angular 1 after Angular 2 is released.

That could be solved by analytics on one domain.

For example, http://getbootstrap.com/2.3.2/.

Post reply on HN