Live data from Hacker News

Criticisms of Angular

leanpanda.com

81–90 of 150 posts

Re: Criticisms of Angular

#81
post #70
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,…

>Server Side Rendering: Uh, the whole idea behind stuff like angular is decoupled frontends from your server. Build a REST API and point angular at it; no need to ship layout code with services. This is not a solution because the lack of content from the perspective of UAs that don't process JS (such as some web crawlers) decreases search ranking. The alternative solution for the architecture you propose (0 rendering…

So code your public facing pages with static html and reserve angular for the app?

The public pages I build for my apps are all static html with some JS for flashy crap that people ask for. Search engines don't need to care about the app itself, just the front page, about page, contact, etc, of the biz.

Unless you're talking about a CMS built in Angular, which can get sketchy. Google's web crawler parses JS now anyway, so it shouldn't be a huge problem.

Re: Criticisms of Angular

#82
post #13
post #8

Earlier quoted context omitted.

why?

Because React solves only the directive part of Angular? I'm not saying it's great BTW, but comparing React to Angular is silly. That's like saying you chose lodash.js over Angular.

>Because React solves only the directive part of Angular?

Lots of people keep repeating that.

It's obvious he means React + React Router + some Fluxy helper lib.

Just substitute "React-based solution" when you read React, and the whole "apples to oranges" or "Angular has so much more" fades away.

(Not to mention that some of us find Angular bloated in the first place, so that it handles "so much more" is not really an asset for us).

Re: Criticisms of Angular

#83
post #47

Earlier quoted context omitted.

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

There are functional reasons, yes. But the best business case for internet dev is a frontend hits a backend, and that's it. The relationship is purely request/response payloads. It's transactional, massively simplifies development and qa, and better encourages the notion that every endpoint should be able to provide, as well as consume services.

Re: Criticisms of Angular

#84
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,…

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

You might consider using mithril.js: https://lhorie.github.io/mithril/benchmarks.html http://matt-esch.github.io/mercury-perf/

Re: Criticisms of Angular

#85

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 agree with this, I've been using Angular for a while now and like it. Every time I read these criticisms of Angular, I always think...compared to what?

For example, I don't find fixing occasional performance issues when using two way binding a big deal. Two way binding makes my UI code much more concise and free from bugs concerning keeping models and the DOM in sync. I've worked with Backbone before for instance and found that dealing with listeners and syncing manually was a huge source of bugs.

Re: Criticisms of Angular

#86
post #75

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…

> 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. React solves all of those in a cleaner way. > I like using nearly straight up HTML as my template. And yet you don't. You use Angular-iz…

I work with React daily and love it but will freely admit that using it for simple data-binding for input heavy forms is a gigantic ass-pain.

If you're using Flux, you end up with an immense amount of boilerplate action and store code around every input field. The other option is to violate the model, make all your inputs uncontrolled and have boilerplate onChange listeners for each one.

Choose the right tool for the job. Angular's no-questions-asked data-binding is perfect for this scenario.

Re: Criticisms of Angular

#87
post #71
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,…

> Dependency Injection: Are you kidding me? He's not even using the array notation for proper DI with minification. Can I just say that this is the single thing that really irritates me about Angular? This has been the "gotcha" forever... why are all the guides not using this syntax by default? Why is this just not "the way you do things" if everyone knows this is a problem?

The array notation can be automatically added to your build tool (gulp, grunt) using ngAnnotate: https://github.com/olov/ng-annotate. This reduces the amount of duplication and Angular boilerplate around dependency injection. Most Angular projects I've worked on use this, making the Angular guides relevant.

Re: Criticisms of Angular

#88
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,…

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

Use something like UI Grid for Angular to create a table in a way that avoids excessive watchers:

"Performs well with large data sets; even 10,000+ rows"

http://ui-grid.info/

Re: Criticisms of Angular

#89
post #75

Earlier quoted context omitted.

> 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. React solves all of those in a cleaner way. > I like using nearly straight up HTML as my template. And yet you don't. You use Angular-iz…

I work with React daily and love it but will freely admit that using it for simple data-binding for input heavy forms is a gigantic ass-pain. If you're using Flux, you end up with an immense amount of boilerplate action and store code around every input field. The other option is to violate the model, make all your inputs uncontrolled and have boilerplate onChange listeners for each one. Choose the right tool for the…

It is incredibly easy to write a function that creates an input field and keeps track of the state wherever you want, so I don't think that is a valid criticism at all.

Re: Criticisms of Angular

#90

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 enjoyed Angular 1.x. But I feel burned really badly by 2.0. I learned 1.3 shortly before 2.0 was announced and it was a really frustrating experience to have just felt like I learned this tool and then have everything thrown out the window. So, I'm not excited about learning 2.0 and haven't yet. I believe the claims that it's faster/better, but the way they threw everything out the window with 2.0 makes me concerned that I'll get burned again.
Post reply on HN