r/javascript • • Dec 05 '16

Dear JavaScript

https://medium.com/@thejameskyle/dear-javascript-7e14ffcae36c
807 Upvotes

271 comments sorted by

View all comments

21

u/phpdevster Dec 05 '16

Have to disagree about the "Angular 2 Is Terrible" complaint. I read that article, and it makes some good points. I believe "premature abstraction" was a phrase used in that article, and it perfectly describes Angular 2. What used to be a pretty simple framework to get up and going with, has now become absolute insanity. My company already builds an enterprise application in Angular 1, how much more enterprise-y does a framework need to be?

Angular 1's major problem is that it's not great when it comes to performance, but beyond that, it's pretty straight-forward even if it's a little more heavy-handed than say, Vue.js.

I have no idea what the A2 team could have been thinking when they made the decision that have resulted in A2 being so much more complex. Isn't the point of a framework to alleviate common problems, not make their implementations more complex than they have to be?

I will NEVER bother using Angular 2 unless I have to for a job - there are far too many other alternatives out there that accomplish the same fucking thing with a lot less cruft.

6

u/jacksonmills Dec 05 '16

I actually thought the main problem with Angular 1 was that the abstractions were not well communicated/documented, not that they were bad or wrong in and of themselves.

They made some real mistakes: Components came way too late and "scope:" options in $compile were always far too permissive and confusing; it should have allowed you to make an isolate scope or no scope at all. ( This would have also helped re: performance ).

But, I found out, after developing in AngularJS (1) for about 3 years, how and when to use a .service over a .factory. I found out eventually how powerful providers could be and how you could use them to reuse code and directives for lots of different applications. I found out how you could extend directives by wrapping them, or extend controllers by decorating them, or extend services by just doing it the old fashion way.

But none of that was documented. The biggest difference between Rails and Angular for me was that Rails guides told me all of the basics and intermediate level concepts I needed to know: Angular barely gets to the basics. When you get to advanced subjects, you are almost completely on your own.

The docs are a lot better now, but with 2 taking so much focus, I doubt they will ever get to where they "needed" to be.

→ More replies (1)