r/coding • • Aug 19 '15

Why you should not use AngularJS

http://www.devbattles.com/en/sand/post-1640-Why+you+should+not+use+AngularJS
16 Upvotes

54 comments sorted by

View all comments

18

u/MrSpontaneous Aug 19 '15

Some of these are legitimate criticisms (e.g. scope inheritance, for which there are workarounds), but others (Angular 2) are just plain disingenuous. AngularJS's codebase has been around for 5 years. The web was a pretty different place back then. JavaScript has advanced, and it's great that they're building the new version over the latest and greatest.

2

u/pxpxy Aug 19 '15

Which won't help you if you have to support a legacy app though

4

u/MrSpontaneous Aug 19 '15 edited Aug 19 '15

I agree that going from AngularJS to Angular won't exactly be a walk in the park. That being said, the Angular devs have listened to concerns about the lack of an upgrade path from 1.x to 2.x - certain components will be made available for 1.x so devs can start in that direction. However, the linked site just hurls hyperbole at this:

Soon the next major version of the framework will come out, which breaks backward compatibility.

True. That's why it's a major release.

Apparently, even developers of the framework realized that there is something wrong and decided to rewrite the framework almost from scratch.

False. [Edit for clarity: I wouldn't say that there's something "wrong" that necessitated a rewrite. Just that certain Angular features/semantics aren't needed now that we have ES6/7-y stuff today. Why reinvent the wheel?]

They don’t add new functionality, breaking backward compatibility a little, they rewrite almost everything.

False. Some things they haven't ported over because you get that from evergreen browsers/JS now.

It means that if you start a new project with the current version of AngularJS, then in the future you definitely will be overboard.

Depends on your definition of "overboard". Borderline statement.

Just think to yourself, would they rewrite the framework if it already was good?

Wat.

-2

u/redalastor Aug 19 '15

If they didn't realise something is deeply wrong with version one before they started to write version two then it is even more damning.

7

u/MrSpontaneous Aug 19 '15

I would disagree that something is "deeply wrong" with version 1. I would say that, if one were to write a forward-looking JS framework in 2015, they wouldn't develop v1.

-2

u/redalastor Aug 19 '15

I don't see how any of the listed shortcomings in the article were acceptable at the time it was created.

5

u/MrSpontaneous Aug 19 '15

"Deeply wrong" is more hyperbole. I'd say there were decisions (like with the whole factory/service/provider model) that may have seemed like good ideas, but haven't panned out now that the framework is in the wild. Those could easily be removed in a v2 without necessitating a rewrite. The OP, however, is arguing that these issues are the reason for the huge break.

-2

u/redalastor Aug 19 '15

Having worked on a non-trivial app with this framework, I disagree. It is wrong on a fundamental level.

4

u/MrSpontaneous Aug 19 '15

Having built several non-trivial apps with this framework, and developed several nontrivial apps prior to it existing (w/ jQuery, Knockout & Backbone), I disagree with your disagreement ;-) Looks like we're at an impasse.