Live data from Hacker News

Criticisms of Angular

leanpanda.com

61–70 of 150 posts

Re: Criticisms of Angular

#61

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've been working pretty much exclusively with Angular for the past 18 months on some high volume financial processing systems. Shipped 3 codebases that would probably be considered 'large'. It's been one of the best development experiences I've ever had.

The learning curve is steep, but when you get into the groove, when it finally clicks, then you can really take off with it.

I love the tooling (node, Yeoman, Grunt, jshint, karma, protractor etc.). While not perfect, it's definitely helped me write better, more readable code.

The one article that helped me get to my 'gotcha' stage was this one by Todd Motto: http://toddmotto.com/rethinking-angular-js-controllers/

Re: Criticisms of Angular

#62

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…

[deleted]

Re: Criticisms of Angular

#63

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 really like Angular and have been able to pick it up faster than other frameworks. Mainly because its a complete framework as opposed to having to mix it with other frameworks like Backbone or React has to do with Express or Ampersand My only gripe is having so much code in the HTML that it makes it nearly unreadable. Maybe this is just the people I've worked with who do this. I think most of this could/should be put in separate controllers?

Re: Criticisms of Angular

#64
post #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 fu…

I like Mitiril, but the way you manage your view layer doesn't work for me. I've tried several "build a Dom in code" approaches before, and they haven't proven to be very maintainable in the long run, especially for larger and more complex solutions. Additionally, the cost of migrating an app is much much higher.

So while this post is mostly FUD, your points are valid, I feel all frameworks come with a tradeoff.

Re: Criticisms of Angular

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

Might be a nasty pill to swallow, but in most cases, populating a grid with 2000+ bindings is in the area I'd call bad UI.

However, I don't think that the performance hit you would take would be that noticeable depending on the implementation.

Here's a jsperf test that can demonstrate angular performance with 10k watchers:

http://jsperf.com/angularjs-digest/72

Chrome 45 gave me about 3.2k ops/sec

Re: Criticisms of Angular

#66
post #48

Say what you will I like Angular 1. And there is a ton of resources and books all over the web to help.There is a solution to everything and it's pretty RAD However, I'm very skeptical about Angular 2. For several reasons. First (I tested it) right now, it is way too complex and unnecessary verbose. They wanted to support future techs like web components, observables (reactive functional programming) which are great,…

I think if a business needs to, I would recommend they move to React now - Angular 2 is shaping up to be quite impressive, and taking pretty much all of the lessons that Facebook has brought with React (& possibilities brought about by the generally clean architecture such as server-side rendering, native mobile app support, etc.), and refining it ruthlessly, but you can only use what is available if you are consuming a third party library. Once Angular 2 is ready though, I would only consider using it in a new project unless the company is already deeply invested in React (or other tech) & doesn't have the time to migrate.

Angular 2 is still rough today, and that is why it is still in alpha - the Angular team is still trying to figure out what do they need to expose in the framework for consumers to build flexible components. In addition, the testing situation still needs to be refined some. The UI Bootstrap team is in the beginning of migration to Angular 2, and we already came across some pain points that Google is working with us to try to ease as much as possible.

As far as ng2 vs. React - ng2 uses pure HTML templates still. ng2 manages to use this and still optimize dramatically over React due to how change detection works in Angular. The template syntax is not complicated once you get used to it - it is much easier than remembering all of the edge cases that JSX has had to write around (i.e. className) due to issues of conflict with JS itself, and certainly much easier than remembering all of the little caveats and edge aspects of ng1.

Web component support for Shadow DOM is opt-in, and it does use the template tag for custom components. Observables have some overhead, but the great thing is that it is optional for many things, and easy to use when something is exposed as an observable.

The Angular 2 DI is much better than the Angular 1 version - it is much more powerful and doesn't require a hacky implementation due to its use of decorators.

Re: Criticisms of Angular

#67

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?

It's not, but TFA mentions lack of server-side rendering as an Angular drawback.

Re: Criticisms of Angular

#68
post #20

He missed so much. How about non-standard invalid HTML? Breaking all searchability and accessibility? Encouraging voodoo coding?

This was the deal breaker for me when first looking at Angular - loose coupling, progressive enhancement, accessibility and keeping code in its appropriate layers seemed to get thrown out for an attitude that everyone has JS running... it felt like a return to the days of Flash. I could ramble for a long time about it, anecdotally; I have peers who use (and seem to enjoy using) Angular (all .net devs), and others who…

While I'm sure this gets abused, I think many of the people who use and enjoy Angular limit it to developing web apps. When I use Angular for something, it's a true web app, and I need to be able to execute client side code. When I have static content, I would just use HTML + CSS.

If you're using Angular, the use case might justify the attitude that everyone has JS running. The same people who hold this attitude when making an Angular app might build perfectly serviceable sites to deliver static content without JS.

Re: Criticisms of Angular

#69
post #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

Totally agree. That style guide has changed the way I write Angular apps completely, and it feels so much cleaner.

Re: Criticisms of Angular

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

>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 on the server) is to add a prerendering server between the Internet and your system.

With JS frameworks that do not depend on the DOM, one can have isomorphic JS that runs in both the browser and node. This means the same code can run on the server, for the first request, and after the rendered code is sent down the pipe further requests use the API.

Sending acontent-less HTML with proceeds to fetch something from some API is a non-answer for websites whose search ranking is relevant.

If I had to chose between isomorphic JavaScript + server-side prerendering OR having an extra layer between my frontend server and the Internet, I rather the former – assuming there are no other language/technology requirements.

Post reply on HN