Live data from Hacker News

Criticisms of Angular

leanpanda.com

131–140 of 150 posts

Re: Criticisms of Angular

#131
for the record: in the second paragraph we can find this sentence:

> we’ve been working with Angular for almost nine months now (the original article in italian is dated February 2015)

it means this post is just a translation of something experienced a year ago (Angular 1.1) A half of the comments reply to solutions arrived on 1.4, with hindsight.

This delay is definitely not clear, but casts new light on the content.

Re: Criticisms of Angular

#132
This article is about 2 years late. These are solved problems in angular 2 by default and have solutions in angular 1.

= Problem #1: Scope inheritance and dynamic scoping

Use directive controllers

= Problem #2: Dirty checking

Use immutability

= Problem #3: Dependency injection

I'm not really sure what the author is saying here. It sounds like he's confused and thinks DI and modules solve the same problem. The one statement he has bolded is completely false: > Angular forces you to use a third, custom designed alternative mechanism: one that is inferior to the already existing mechanisms available. You can use a module system if you want. Nothing is stopping you.

= Problem #4: Pointless complexity

> providers, values, factories, services, constants [...] All five concepts could easily be assigned a single identity. True, so just use providers if that makes you happy. Angular 2 also simplifies things.

= Problem #5: Server-side rendering

He stated a solution for angular 1. Personally, I don't really care about server side rendering so I won't elaborate. Angular 2 will have angular-universal

= Problem #6: Angular 2

> Not convinced yet? Well, what if we were to tell you that the next major version of Angular will take a scorched earth approach to the existing structure that means it will have zero retro-compatibility with what exists today?

> it would be simply foolish to use Angular 1.x for new applications.

LOL, fear mongering. The angular team has already stated there will be a migration path to angular 2. They also announced they will continue to support angular 1 as long as people are using it. It's funny that he complains about angular 2 when it addresses his problems with angular 1.

Re: Criticisms of Angular

#133
Angular is the answer to another question than the question that I usually face. So, the usability guy and the graphical designers have produced HTML/CSS page designs that work well and look good. The purpose of the javascript that I will be adding, is to make sure the user interface functions. Faced with these requirements, I have never been in a situation in which I felt that something like Angular would be able to contribute anything useful. If you drag Angular into the fray, it will be the most important kid in the room that you will need to constantly babysit. Forget about what you want to achieve. Think of Angular first. Everything else is unimportant ...

Re: Criticisms of Angular

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

keep in mind that even if you go with angular you don't need to use it in 100% of your site. Need to display a grid of data fast? Use any grid. There are lots of fast grids out there. Angular 2 eliminates dirty checking (last I've read) so it could be good enough, or maybe there will be something faster on the market that works best in your situation. There is no reason to assume that once you go with Angular you are now limited by 2000 watchers. you don't have to choose between Angular vs React vs Ember for that a single specific case (unless maybe one big mega grid is the bulk of your app). It is far more important to decide which architecture works best for your needs/team and how it will fit with all the other decisions you've made in your application stack.

Re: Criticisms of Angular

#137

Earlier quoted context omitted.

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

Compared to Ember. Most of the time all you need is a computed property. It simplifies the code base and allows the framework to make optimizations where it needs to. If you really need a two way binding you can always do it with a computed alias.

ember's computed properties are irrelevant if you're targeting any kind of modern browser. Object.defineProperty is the standardized way to do this and perfectly possible within Angular-land (and more performant than literring your code with $watches)

Re: Criticisms of Angular

#138
post #32
post #13

Earlier quoted context omitted.

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.

> like saying you chose lodash.js over Angular. It's a valid comparison, if you feel Angular tries to solve problems you don't have, and in doing so, causes other headaches.

I would rather use any bare bones library, or no library at all, than Angular.

Re: Criticisms of Angular

#139
post #111

Earlier quoted context omitted.

I love Mithril's (and other's) "build a DOM in code" approach. Traditional templating systems are always limited domain-specific languages that add lots of complexity for things that should be simple, template "partials" and iteration come to mind instantly. Making the virtual DOM tree a first-class value that can be treated as a persistent data structure is a huge win. Templates are functions that return a virtual D…

> On top of Mithril, I recommend working in a functional reactive library (Kefir, Bacon, Rx, whatever else) to make the whole application declarative and functional. How are you using an FRP library with Mithril? I thought with vdom libraries you never touch the real DOM.

synthetic events' handlers can publish events to a bus, and you can create observables on the events on the bus.

VDom lets you express UI as a function of the state

Observables let you express state as a function of user interactions

Re: Criticisms of Angular

#140

This article is about 2 years late. These are solved problems in angular 2 by default and have solutions in angular 1. = Problem #1: Scope inheritance and dynamic scoping Use directive controllers = Problem #2: Dirty checking Use immutability = Problem #3: Dependency injection I'm not really sure what the author is saying here. It sounds like he's confused and thinks DI and modules solve the same problem. The one sta…

Oh! So just have a bunch of arcane design patterns instead of using the tools packaged with the framework! Sounds great...
Post reply on HN