Live data from Hacker News

Angular 2 Release Candidate

github.com

51–60 of 139 posts

Re: Angular 2 Release Candidate

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

No problem. People like you have to stick with the old stuff because of this mindset. I mean WTF is bugging you? It's just code you have to write in order to get the thing running. You could also complain about the empty object in the angular1 method.

Re: Angular 2 Release Candidate

#52

Earlier quoted context omitted.

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 p…

This was the case in Angular 1 - in Angular2, not so much. The component-tree structure (much like React) allows far smarter optimization on change detection - both with immutable data structures and observables - entire subtrees of components can be removed from the change detection step until the state notifies it of a change.

Good reading material by a team member - http://victorsavkin.com/post/110170125256/change-detection-i... and http://victorsavkin.com/post/114168430846/two-phases-of-angu...

An early beta comparo - http://www.roblog.io/js-repaint-perfs/angular2/opt.html vs http://www.roblog.io/js-repaint-perfs/react/opt.html - should probably update these with the latest RC.

Re: Angular 2 Release Candidate

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

We've been slowly migrating https://splice.com from Angular 1 to Angular 2, so far it's been great. We switched to TypeScript, we cleaned up our code organization. We are writing new components in ng2 and migrating old code we we go. The betas have been somewhat painful with bugs and breaking changes, but that's the price to pay. When it comes to performance and consistency, ng2 is a big winner. Why not React you might ask? React is great, but having to figure out/argue for each piece of the frontend stack isn't something we were willing to do. ng2 has its quarks bug at least it comes as a whole and that's super useful for us at this moment.

Re: Angular 2 Release Candidate

#54
post #49
post #42

Earlier quoted context omitted.

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.

Animations work really well with React!

The Animated library (originally from React Native) gives you some pretty basic but powerful primitives to build whatever animation you need.

Re: Angular 2 Release Candidate

#55
post #43
post #22

Earlier quoted context omitted.

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.

> With angular being backed by google, there is

> no guarantee if angular will be maintained 4 years

> down the line.

It's interesting to see that the reason why many companies choose Angular (Google backs it) now seems one of it's biggest disadvantages.

Re: Angular 2 Release Candidate

#56
post #45

Earlier quoted context omitted.

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.

What exactly do you mean? What is better then having a reliable, easy to write unit tests which cover most of the logic and run very fast?

Re: Angular 2 Release Candidate

#57
post #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.

This really comes down to your team - try them out and see what feels good for you. React is a great library, and as an angular1 dev before joining the core team, I learned a TON from playing with React and especially Dan Abramov and Redux - most of the same patterns are immediately portable to angular2.

Re: Angular 2 Release Candidate

#59
Half off topic but I want just to add that Webstorm IDE has already quite a good NG2 support. For example you can jump from html to a component function via F12 or auto import unresolved statements. You see VS Code on many NG2 presentations. I think Webstorm helps more getting quicker into NG2. Also Angular-CLI helps a lot. I mention this here because many people seem to struggle with the boilerplate code.

Re: Angular 2 Release Candidate

#60

Lots more work to do here, but we're pretty happy with how the core looks! For those worried about size (which has absolutely been a fair concern over the alpha/beta process) - here's a "hello world" built with Rollup and our offline template precompilation. Clocks in at 200kb min/47k gzipped, with a bit more room from optimization over the next couple of weeks... https://ng2-compiler-test2.firebaseapp.com/

How are we tracking with:

https://github.com/rollup/rollup/issues/280

Do you rollup angular or is it still an external dependency?

Post reply on HN