Hacker News new | ask | show | jobs
by Bahamut 4190 days ago
To be honest, this article is pretty poor, and even demonstrates the lack of understanding of Angular the author has.

The databinding capabilities is said to be at 8000+ watchers now, although not all watchers are equal. A lot of performance improvements have been made since 2-3 years ago when that post was made about the watchers, which is where that oft poorly quoted 2000 watcher number originates from.

The two way databinding complaints miss the mark - the point of them in directives was to mimic eencapsulation and what is now being known as the we component spec. Web Components are essentially what Angular directives were meant to be in absence of an official spec for browsers to implement. The point of two way databinding in inputs also are for encapsulating logic for each component.

The comments about ng-cloak and ng-bind were also flat out incorrect.

I think most of all, the author doesn't understand context - Angular was conceived during a different time for frontend, and at a different time with browser support. Five years is a long time to last in the frontend world currently, and that it will likely last at least 3 years more is surprising for a framework that has changed frontend development for the better overall.

Angular is obviously not perfect, and the core team members are quick to point out flaws in approach, or solutions that were good at the time but don't make sense going forward due to changes in the browser environment or other technologies solving problems that Angular had to solve, such as with Object.observe, ES6 modules, and ES6 promises.

I have built & architected many Angular apps over the past two years, some being very complex due to the problem space. I have found Angular to be perfectly suited to the task, and snappy to boot. I have seen very few perf problems where I could not fix them with a little work - the only one that was too difficult was dealing with editable tables with lots of data in older browsers (IE8 - 10), and I believe I could have tackled it, but I was playing more of an advisor role to another developer, and these sort of problems usually require the engineer working on the problem to understand the nuances of the code itself.

2 comments

Additionally, if you have even 2000 data bindings onscreen at once, your users are likely going to be looking at too much information no matter how snappy your UI is. The more info your $watch has to deal with, the more info your users have to expect to change.

The more you want to throw on a page (say for infinite scrolling), not surprisingly, the more you'll have to be careful about how you do it. The benefit with Angular has always been that it brings the difficulty of every task down a notch or two and limits your cognitive load, very much due to its design. You still have to design your page and architect your data.

To be honest, after three years with the product, I still think Angular (1.x) was 10 years ahead of its time.

I've also come to a realization about Angular 2.0 as well: how many people are still using Windows XP? It's almost 4 versions behind, and closed-source to boot. I (as many others did) jumped all-too-quickly to the conclusion that I had to switch to version 2.0 when it came out. That's simply not the case.

Heck, even Microsoft seems to get every other version wrong. Maybe Angular 3.0 will be the time to switch.

My thoughts exactly. There's nothing new or unique about this article that hasn't been brought up or debated before.

Saying that data binding is wrong because it doesn't use click handlers for a button is kinda silly...Angular allows you to do that. I use ng-click all the time on buttons. $watch is for communicating between interdependent components not handling click events.