Live data from Hacker News

Angular 2 Release Candidate

github.com

41–50 of 139 posts

Re: Angular 2 Release Candidate

#41
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

React is just about dirty-checking the view, while Angular dirty-checks the model. I mean, seriously, that's the main difference conceptually. You just modify some data structure and both frameworks will update some view.

Ugh, this lacks any contextual reason on why one is better than the other. Dirty checking a model requires a direct comparison on every digest loop, regardless of whether or not the state has changed (because we don't know if the state has changed).

React runs its dirty check only after a state change obligates it to. As your model gets larger and larger, dirty-checking the model on every digest loop starts to have performance problems.

Oversimplification can be incredibly misleading.

Re: Angular 2 Release Candidate

#42
post #34

Earlier quoted context omitted.

React lets you summarize your framework in a single sentence: make your UI a pure function of your model, but keep performance. OTOH, I still don't understand what the deal with Angular is.

That's sounds great but it does not really play out in a real world if you need to animate transitions to make UI look nice for example.

I disagree. CSS animations work very well and offer better performance. You can maintain the animation lifecycle by the React lifecycle callbacks and use of setTimeout

Re: Angular 2 Release Candidate

#43
post #22
post #5

I realize a lot of companies flocked to Angular and it's used in a lot of places, but from the outside it seems to be fighting on two fronts. 1. Companies currently implementing it not wanting it to change or for there to be a quick and painless migration from 1.x to 2.x. So, less change, more hand-holding. The web changed a lot though, so its change is understandable. 2. Trendsetters and upcoming companies looking f…

It is the million dollar question. If you are building a large product with an expected life of 10+ years, can you trust Angular to still be maintained?

short answer: "No".

Explanation: In js land, Long term Support means "6 months". so your best bet is to have a framework which makes migrations easy and does not introduce changes.

With angular being backed by google, there is no guarantee if angular will be maintained 4 years down the line.

PS: feel free to keep your million dollar.

Re: Angular 2 Release Candidate

#44
post #23

Earlier quoted context omitted.

Just out of curiosity what exactly can you do with React that you can't with Angular 2?

React lets you summarize your framework in a single sentence: make your UI a pure function of your model, but keep performance. OTOH, I still don't understand what the deal with Angular is.

Angular is an ORM for the DOM. With an ORM it's: "here's my model, figure out what to do to the database". With Angular it's "here's my model, figure out what to do to the DOM". Some people hate ORMs because there's too much magic, other's like them because they let one think about other parts of the app more.

Re: Angular 2 Release Candidate

#45
post #23

Earlier quoted context omitted.

Just out of curiosity what exactly can you do with React that you can't with Angular 2?

React with redux allows to write most of the code in a purely functional / no side effects manner, which makes testing code almost a joy.

You can use Redux with almost anything including Angular 2. The purely functional manner is only an option if you Ok with providing subpar user experience (need to provide quality cross component animated transition that no side effects functional thing goes out of the window really fast). Given modern tooling the testing point is also a bit overstated.

Re: Angular 2 Release Candidate

#46
I'm happy to see Angular2 getting closer to a release, and as many other companies we are in the case of what decision after Angular1.

One thing I think will be a great push for Angular2 is Ionic2 which alone is reason enough but to be honest I prefer the `Aurelia way` when it comes to writing web apps which sounds more natural, Sad to see Aurelia hype haven't took much so far (understandable that it's getting harder to get people on board a new `revolutionary` JS framework).

Re: Angular 2 Release Candidate

#47
After taking a look at Angular2 I definitv know that my when I need to rewrite my app with something like that:

    app.AppComponent =
    ng.core.Component({
    })
    .Class({
    });
from

    angular.component('name', {});
I will go a totally other route than upgrading. I mean wtf. the JavaScript Part of Angular 2 is horrible. Since I'm on a Scala Server I possible try to look at Scala JS and rewrite something. It's too bad that our "application" fit's the SPA scheme so good, but these frameworks changes so much over the years that it's nearly not maintainable will a small group.

Re: Angular 2 Release Candidate

#48

Angular core team member here, happy to answer questions

I hear a lot about angular and that it has gotten quite a competition from react, aurelia and vue.

I personally will never use react. but i want to know, in which situations, it would be better to use angular and in which situations it would be better to use aurelia or vue.

Re: Angular 2 Release Candidate

#49
post #42
post #34

Earlier quoted context omitted.

That's sounds great but it does not really play out in a real world if you need to animate transitions to make UI look nice for example.

I disagree. CSS animations work very well and offer better performance. You can maintain the animation lifecycle by the React lifecycle callbacks and use of setTimeout

CSS animations do not work when you need to morph distinct components in complex coordinated manner. They are significantly slower then velocity js. Doing things available with quality solutions such as Ember liquid-fire are simply not possible.

Re: Angular 2 Release Candidate

#50
post #47

After taking a look at Angular2 I definitv know that my when I need to rewrite my app with something like that: app.AppComponent = ng.core.Component({ }) .Class({ }); from angular.component('name', {}); I will go a totally other route than upgrading. I mean wtf. the JavaScript Part of Angular 2 is horrible. Since I'm on a Scala Server I possible try to look at Scala JS and rewrite something. It's too bad that our "ap…

Unless you hate yourself I think it's best to with Typescript for Angular2. It is more natural with classes, and less verbose in the long run than vanilla js. Also you will find more documentation and tutorials geared towards the Typescript version.
Post reply on HN