Live data from Hacker News

Angular 2 Release Candidate

github.com

31–40 of 139 posts

Re: Angular 2 Release Candidate

#31
post #11

Earlier quoted context omitted.

I read something a while ago that I think really sums the key difference, is that angular and other frameworks inject javascript into html and its awkward. React injects HTML into javascript, and it seems, that way around is a lot more powerful as you have all of javascript to manipulate html rather than having HTML/Templating/Extensions to manipulate Javascript. The two advantages are speed (it's supposed to be fast…

I think a lot is preference. I think HTML in JS is dirty just like HTML in server side strings. Other people feel the opposite, that putting new tags which are similar to inline onclicks and other events that we moved away from w jQuery is dirty. There is truth to both. Angular gives a lot of flexibility in code style and structure. You can componetize everything and have all your component files in one folder. You c…

> Other people feel the opposite, that putting new tags which are similar to inline onclicks and other events that we moved away from w jQuery is dirty.

Not even remotely the same thing. HTML has a hierarchical structure which isn't a particularly good structure for a web application. Javascript syntax allows far more control over the hierarchy.

Your example is akin to saying putting a tank in an airplane is the same thing as putting an airplane in a tank.

> You can inline it.

Pretty thin separation between inline templates and JSX. But then, I've never understood why people think putting their template in a different file is somehow separation of concerns.

> I personally like my html being approachable to junior devs and not being so chopped up and abstracted away from static HTML markup like it might be with React.

Oh it's abstracted, with completely invalid HTML syntax and template variables. That's not to say that it's bad, I quite like the simplicity of the event/binding syntax of Angular 2. But JSX and Angular Templates are just two sides of the same coin.

Re: Angular 2 Release Candidate

#32
post #23
post #7

Earlier quoted context omitted.

As someone that works for a #1 company, I am living that anxiety. We all know it will be inevitable, and we all know it will be hell rewriting it. If it's more than copy-pasta then I doubt it will be received well. And #2 is spot on -- React is eating Angular's lunch. I'd love to use it at work but I can't, and I don't think I'm the only one.

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.

Re: Angular 2 Release Candidate

#33
post #7
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…

As someone that works for a #1 company, I am living that anxiety. We all know it will be inevitable, and we all know it will be hell rewriting it. If it's more than copy-pasta then I doubt it will be received well. And #2 is spot on -- React is eating Angular's lunch. I'd love to use it at work but I can't, and I don't think I'm the only one.

And there will be something that will eat React's lunch soon too, just a matter of time.

Re: Angular 2 Release Candidate

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

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.

Re: Angular 2 Release Candidate

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

Angular embraces two way data binding while React does everything humanly possible to avoid it.

I will also point out that Angular essentially re-implements JavaScript in the form of extensions to html. EG, if you want to iterate over something in React, you use map while Angular makes use of ng-repeat.

Re: Angular 2 Release Candidate

#37
post #7
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…

As someone that works for a #1 company, I am living that anxiety. We all know it will be inevitable, and we all know it will be hell rewriting it. If it's more than copy-pasta then I doubt it will be received well. And #2 is spot on -- React is eating Angular's lunch. I'd love to use it at work but I can't, and I don't think I'm the only one.

React is not the only competitor either. Aurelia and Vue are there to make up for react's problems.

Re: Angular 2 Release Candidate

#38
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?

Can you trust the web as we know it to exist in 10+ years?

Re: Angular 2 Release Candidate

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

I was surprised to find that Angular has a limited duration time window during which changes will update the view. In my case, symptoms were observed only after deployment, for user who had a high latency connection between their browser and the server.

One could mitigate this by calling $scope.$apply() after every change. But if you have to apply() all changes, then what's the point of having angular handle synchronization?

Re: Angular 2 Release Candidate

#40
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?

I cant recall a single UI library / framework (with the solely exception of Jquery) to be mantained that much. In less than 5 years VR, AR will probably be mainstream, and UI technologies will probably to be revisited from ground up again.
Post reply on HN