Live data from Hacker News

Criticisms of Angular

leanpanda.com

51–60 of 150 posts

Re: Criticisms of Angular

#51
I always feel like scope inheritance problems are overstated.

It's weird, but it's weird in the exact way that JS prototypical inheritance is weird. So it's important to learn.

Anyways the fix is simple, always initialize your variables before you use them. Either in the controller or using an ng-init.

Re: Criticisms of Angular

#52

Sometimes I feel like I'm the only one who actually likes Angular. Two way data bindings are very convenient for writing UI. I don't want to write an event listener for every onclick, onchange, and onkeypress. I want the values in my models and the values in the DOM to be in sync. I like using nearly straight up HTML as my template. I do this in Django, so why not in Angular? I like that I don't need to render things…

I think Angular is so widely used because so many people do like it. It has quirks and shortcomings (per the article), but those are only relevant because it is generally liked and used by so many.

I agree on the documentation being unusual. I found the Angular Style Guide to be a huge help: https://github.com/johnpapa/angular-styleguide

Re: Criticisms of Angular

#53
post #49

Earlier quoted context omitted.

I've never understood any comparison between React and Angular. To me it seems like trying to compare a slick car to a fancy car garage. They try to solve quite different problems, right?

> They try to solve quite different problems, right? Sort of. The problem React is solving is a subset of the problem Angular is solving. It's a bit more like comparing an older model sports car to a modern engine.

A modern engine that also insists on doing your taxes.

Re: Criticisms of Angular

#54
post #47
post #37

Earlier quoted context omitted.

Not to mention his example is just straight wrong about $scope and ng-if. His JSFiddle examples are all using angular 1.1.5. Angular 1.2 properly binds scope inside an ng-if. I agree that angular 1.1.5 had it's warts, if that's what this is supposed to be about. The current release version of angular is 1.4, about to be 1.5. Edit: After fully reading through this blog post; it's almost all wrong. Dirty Checking: Yes,…

+1 on just saying no to server side rendering. This should be idiomatic.

There are tradeoffs to both. Server-side will always have a seat at the table. Ex - populating a simple key-value select statement will always perform better using server-side.

Re: Criticisms of Angular

#55

Sometimes I feel like I'm the only one who actually likes Angular. Two way data bindings are very convenient for writing UI. I don't want to write an event listener for every onclick, onchange, and onkeypress. I want the values in my models and the values in the DOM to be in sync. I like using nearly straight up HTML as my template. I do this in Django, so why not in Angular? I like that I don't need to render things…

> it just seems that people get scared of the documentation and run away before they really give it a try

Anedoctally, as the author of another JS framework (http://mithril.js.org), I see a lot of people migrating away from Angular due to complexity, bloat and performance issues. I, myself, spent a good two years wrestling w/ Angular problems full time before jumping ship. Our apps were quite complex and we were fully invested in trying to make Angular work, and definitely not just making a half-assed effort to like it. So it's definitely not just newbies.

Re: Criticisms of Angular

#57
This is a rehash of the same problems that have been circulating for years [0]. There is literately not a single original thing here. Most of these issues are gotchas that can easily be avoided once the developer is aware of them (such as scope inheritance / dynamic scope which is due to Javascript Prototypal Inheritance [1]).

What's ironic is that angular 2 is fully rewritten in part to fix all of these issues, but none of that is mentioned, and the only focus is on how much Angular 2 sucks because it's not compatible with 1. There is also no mention of clear migration path and ability to run angular 1 and 2 side by side [2]

I've put 4 Angular sites in production and never faced issues due to any of these problems. I've had issues with caching, end to end testing of ajax calls, sharing functionality with non angular parts of the site. The very fact that the OP listed these issues tells me that he's not actually used Angular in production. Angular 1.x has limitations for sure but it works quite well in most scenarios.

[0] http://larseidnes.com/2014/11/05/angularjs-the-bad-parts/

[1] http://jimhoskins.com/2012/12/14/nested-scopes-in-angularjs....

[2] http://angularjs.blogspot.com/2015/08/angular-1-and-angular-...

EDIT: shortened. EDIT2: added conclusion

Re: Criticisms of Angular

#58
Angular may not be perfect, and there are lots of other tools out there, but Angular definitely remains an option to get the job done. And when articles like this pop up, I wonder if we all unconsciously fall into the trap of the "Fallacy of the Perfect Framework" described by Shawn Wildermuth in a recent post. As if moving from one framework to a different one, we will all of the sudden have no more problems and everything will be "perfect".

http://wildermuth.com/2015/09/01/Angular_v_React_v_Aurelia_v...

Re: Criticisms of Angular

#59
post #37

So, they trot out the same tired arguments against Angular that people have been making since the beginning, and this makes the front page where people engage in serious discussion about it? Did I miss some subtle novelty about this post, or is Angular ennui just that popular on HN?

Not to mention his example is just straight wrong about $scope and ng-if. His JSFiddle examples are all using angular 1.1.5. Angular 1.2 properly binds scope inside an ng-if. I agree that angular 1.1.5 had it's warts, if that's what this is supposed to be about. The current release version of angular is 1.4, about to be 1.5. Edit: After fully reading through this blog post; it's almost all wrong. Dirty Checking: Yes,…

Dirty Checking: Yes, we have have to sacrifice ease of use for performance sometimes. So keep it in mind and don't make so many simultaneous data bindings. Why you would need 2000+ in any given state(ui-router)/route is just mystifying. Don't abuse ng-model.

As someone who's going to need to make a recommendation soon about whether or not to use Angular on a new project, this part worries me. The apps my company builds are full of data grids (Enterprise CRUD-based stuff) and it's entirely reasonable for us to have a 100-row grid with 20 columns as just one of the components on our page. So that's 2000 data bindings right there just for the data values. We'd also have metadata on every cell bound to classes and validation state. If we allow in-place editing, a single one of those fields can be updated. We can't have the entire grid re-checked after every update if that's going to hit the limit on acceptable performance. We'd need to limit it to the row (eg: cross-field validation rules) and elements outside the grid (eg: change toolbar button states.)

Does Angular 2 have similar limitations? Should we wait for Angular 3 and Object.Observe?

Re: Criticisms of Angular

#60

Sometimes I feel like I'm the only one who actually likes Angular. Two way data bindings are very convenient for writing UI. I don't want to write an event listener for every onclick, onchange, and onkeypress. I want the values in my models and the values in the DOM to be in sync. I like using nearly straight up HTML as my template. I do this in Django, so why not in Angular? I like that I don't need to render things…

I like that I don't need to render things server-side because then the server is just running a REST-ful API. That way I can write different clients for the API and don't have to change the server (mobile app, desktop UI, etc.)

How is that specific to Angular?

Post reply on HN