Live data from Hacker News

Why you should not use AngularJs

medium.com

21–30 of 48 posts

Re: Why you should not use AngularJs

#21
post #11

I am working on a large app based on angular (not my decision - I voted against it :)), and felt many pain points already, from poor design overall, to crappy extensions most of the currents apps are using. It Kinda reminds me whole Wordpress thing. Really subpar codebase - but at the same time very easy to make simple things, and as a result - a lot of popularity. And this comes not as surprise to see so many blog p…

Currently, all our javascript apps use Backbone and a few use Marionette. I'm a fan of Marionette but certainly no evangelist for it. For me, it really soothes the main pain points I had with Backbone. All that being said, we are about to be forced to use Angular on a big new directive and will even have to re-write some of our old apps with Angular. I am very worried about this.

Re: Why you should not use AngularJs

#22

In the section on minification; > When you minify your code, it stops working, since variables are injected by name. ... You have to use this syntax ... We didn't have that problem. Or rather we did until we reaised that the minification tooling can convert it automatically. The author does not know that his problem is not a problem any more as it has already been solved.

FWIW, newish versions of angular can be set to explode in your face if you use the shortened syntax even when unminified using "ng-strict-di" which I suggest everyone to use.

Re: Why you should not use AngularJs

#23
That's all fine but literally the #1 reason you should not use Angular is how the angular team tossed everything for version 2.

How can you trust such a tool? Do you want to rewrite your applications when version 3 comes out? Whos to say thy want do the same thing come v3

Re: Why you should not use AngularJs

#24
post #16

Earlier quoted context omitted.

What would be a sane framework? Every one of them seems to have many pain points, and every other developper tells you should use X instead of Y because Z.

I specifically did not mention any names to not trigger flamewar. And mentioned Ember only in relation to the video. For me personally it is Backbone (very minimal skeleton-like framework), view/binding library I like today (and can switch tomorrow) and routing I probably write myself for specific use case. If this is too "low-level", next what I will check in "higher level" framework - as least "magic" as possible -…

[deleted]

Re: Why you should not use AngularJs

#25
post #11

I am working on a large app based on angular (not my decision - I voted against it :)), and felt many pain points already, from poor design overall, to crappy extensions most of the currents apps are using. It Kinda reminds me whole Wordpress thing. Really subpar codebase - but at the same time very easy to make simple things, and as a result - a lot of popularity. And this comes not as surprise to see so many blog p…

Currently, all our javascript apps use Backbone and a few use Marionette. I'm a fan of Marionette but certainly no evangelist for it. For me, it really soothes the main pain points I had with Backbone. All that being said, we are about to be forced to use Angular on a big new directive and will even have to re-write some of our old apps with Angular. I am very worried about this.

I went through exactly the same thing during last year. And if you liked backbone/marionette combination, you very likely hate angular :) BTW, make sure decision maker knows that Angular 2.0 should be released soon and there is no upgrade path between 1.x and 2.x :)

Re: Why you should not use AngularJs

#26
post #16

Earlier quoted context omitted.

I specifically did not mention any names to not trigger flamewar. And mentioned Ember only in relation to the video. For me personally it is Backbone (very minimal skeleton-like framework), view/binding library I like today (and can switch tomorrow) and routing I probably write myself for specific use case. If this is too "low-level", next what I will check in "higher level" framework - as least "magic" as possible -…

> debuggable views One thing I've found while doing Android dev is that views should exist as an immutable collection of state (POJO in Java), and there should be some mechanism to inflate a view from that state. I'm not sure how Angular or Backbone deal with this, but that switch simplified the logic a great deal and made testing straightforward.

this is idea behind handlebars templating - ideally, no logic whatsoever and you just supply object with data to render. But in reality it gets more complicated than that and sometimes you need to debug templates too. Unfortunately, debugging angular templates is pretty much hell (mostly because of all the "magic").

Re: Why you should not use AngularJs

#27

> There is a fundamental rule in programming, it relates to absolutely any technology or language, this rule says that explicit is always better that implicit. Is this a fundamental rule? I thought it was something highly valued by python culture but not by, say, ruby on rails.

"Explicit" ties in to readability and from there, long-term support-, maintain-, and debug-ability. While OP did issue a blanket statement, this idea is fairly language/framework independent.

Re: Why you should not use AngularJs

#28
post #11

I am working on a large app based on angular (not my decision - I voted against it :)), and felt many pain points already, from poor design overall, to crappy extensions most of the currents apps are using. It Kinda reminds me whole Wordpress thing. Really subpar codebase - but at the same time very easy to make simple things, and as a result - a lot of popularity. And this comes not as surprise to see so many blog p…

What would be a sane framework? Every one of them seems to have many pain points, and every other developper tells you should use X instead of Y because Z.

I would suggest an exercise which my senior suggested. Take a look at what very successful websites use. I looked at the code of Facebook and the simplicity of their code fascinates me.

The only thing they seem to use is react, a requirejs like module system combined with an EventEmitter. I still don't understand the need of three layers of abstraction on the front-end level. I would love to be proven wrong, but that seems outright over-engineering.

Re: Why you should not use AngularJs

#29
There sure are a lot 'Angular is Bad because...' articles out right now. Is it mainly because of the rewrite?

I've begun using Angular for personal projects. At work we use CANjs. I like CANjs but I have to say it feels easier to become productive on AngularJS. For me productivity is most important.

Regarding framework vs library. I heard more than one speaker at Fluent last year say that Angular was a library and not a framework like Ember. For me Angular seems pretty light weight compared to what else is out there.

Maybe in a few months I'll feel different. For now I don't hate on Angular.

Re: Why you should not use AngularJs

#30
post #26

Earlier quoted context omitted.

> debuggable views One thing I've found while doing Android dev is that views should exist as an immutable collection of state (POJO in Java), and there should be some mechanism to inflate a view from that state. I'm not sure how Angular or Backbone deal with this, but that switch simplified the logic a great deal and made testing straightforward.

this is idea behind handlebars templating - ideally, no logic whatsoever and you just supply object with data to render. But in reality it gets more complicated than that and sometimes you need to debug templates too. Unfortunately, debugging angular templates is pretty much hell (mostly because of all the "magic").

The way Square's library Mortar handles it in Android is that you essentially have a Model-View Model-View-Presenter sort of situation, where your View Model is JUST your data, your View is JUST the view logic, and the Presenter takes care of knowing how to inflate/deflate the view. It's pretty clean if your design is clean but can get hairy easily if it isn't; that's a feature not a bug for me.
Post reply on HN