Live data from Hacker News

Angular JS Kinda Sucks

okmaya.com

51–60 of 66 posts

Re: Angular JS Kinda Sucks

#51
post #22

To me this post boils down to "I already know jQuery, this isn't jQ, so WTF". Well, godspeed, you fancy bastard. I wouldn't use Angular for a small'ih average website where you want some minor JS-based UI functionality. But I found Angular much more suited than jQuery for big sites that are maintained by more than just one developer. You can look at some piece of HTML and you can tell from the list of directives what…

"I believe that with a framework like Angular it wouldn't have gotten out of hand like this," I disagree completely and in every possible way. This has been the hallmark of every new language/framework/coding philosophy/rant that has ever been made about coding in the last 30 years. And it's always wrong. It's wrong because it doesn't get the real issue: Your code is bad because you have multiple untrained developers…

> Your code is bad because you have multiple untrained developers just adding code to fix their current problems

Yes, definitely! That is the core problem. My point, the one I obviously failed making, is that it's easier for an untrained dev to just add a line or two to a codebase where everything looks the same due to a lack of clear boundaries (modules, classes, whathaveyou).

I had to sift through ~10k lines of JS code that had accumulated over a span of several years. There was no modularity, no real clear-cut structure, which made everything hard to read, so noone really bothered—they just layered crap on top, done.

Having a JS thing called `HerpDerpCtrl` where you can tell from searching your HTML whether or not it is still in use would have made the job of cleaning up much easier. That's why I like frameworks, they provide a structure.

It won't solve the problem of having bad developers in your team, or a lack of meaningful code reviews, or missing tests, but I believe it'll make it harder for people to screw things up.

Re: Angular JS Kinda Sucks

#52
post #6

Well, I think Angular may be unintuitive for people having gotten used to the "jquery way" of thinking. But I think the jquery way of thinking is the problem here. For too long people have been doing direct DOM-manipulation, and fail to see how they can achieve what they want in a more declarative manner. When I started using Angular I had really no experience with jquery or any other js framework, and I felt Angular…

Data binding coupled with a declarative syntax isn't a "new thing", especially in the enterprise world, .NET and Java. It's an acquired taste and I never really felt comfortable with it. You can build some perverse architectural monstrosities on top of it. Of course that's true for every technology or framework, but I am of the opinion that many of frameworks that tout data binding / declarative syntax actively encou…

You are right. I come from the backend world, so that may be the reason I felt jquery was "weird" and angular "right".

Re: Angular JS Kinda Sucks

#53

Earlier quoted context omitted.

http://okmaya.com/clean-php/clean-php-step-6/ If you know PHP, you know that you shouldn't be doing it like that. He sounds like a novice. There's nothing wrong with that, but when looking at that kind of thing I would take an opinions as a grain of salt

It doesn't really matter what the language is, SQL injection vulnerabilities are serious in any language. A competent web developer understands that -- especially a "Programmer Extraordinaire".

Yeah, let's nitpick everything this guy has written. Way to ad hominem him!

Re: Angular JS Kinda Sucks

#54

This is like people saying why use jQuery or MooTools or prototype 7 or 8 years ago. Within 5-10 years we'll be transitioning to a world where SPAs/native-like apps are the norm. The way I see it at the moment is: 1. SPAs/native-like apps are really hard to do well still and the reserve of the coders with lots of skill/time to play 2. Javascript is still very hard to manage when writing anything non-trivial. Unfortun…

Thanks for this. Really resonates. It is fast becoming clear that js is our c and jquery is our c++.

Things like coffescript, backbone and angular are attempting to provide a cleaner interface to the memory management which we could equate to the Dom. High level, abstract models, and allowing us to think of things in much more elegant ways.

jQuery wasnt anything new, we had seen others similar, none however got the ease of use down quite like jQuery, and certainly none of them got the market share.

While this guys post isn't all that useful to me, maybe even a bit odd to find on HN, I still am greatful for this thread and will definitely be taking another pass of angular this weekend. Seems like it's a bit better understood and I think I'm clearer on its intent. Discl: I was previously in the camp that felt angular was taking us many steps back into coupling of ui to js. It sure seems that way but it may have been the case we were just doing it wrong way back then (on click=)

Edits: new phone, autocomplete, hasn't adjusted yet.

Re: Angular JS Kinda Sucks

#55

"How do I “think in AngularJS” if I have a jQuery background?" was asked a while back on StackOverflow and is a fairly good read for anyone looking to pick up AngularJS after jQuery http://stackoverflow.com/questions/14994391/how-do-i-think-i...

This link is really interesting (more interesting than the original article).

Re: Angular JS Kinda Sucks

#56
Documentation really is not beginner friendly. Try watching these screencasts which will introduce you to the workflow and the beauty of AngularJS and you will make a small application during the exercise:

AngularJS Fundamentals In 60-ish Minutes by Dan Wahlin:

http://www.youtube.com/watch?v=i9MHigUZKEM

Introduction to Angular JS by David Mosher:

http://www.youtube.com/watch?v=8ILQOFAgaXE

Re: Angular JS Kinda Sucks

#57
post #22

Earlier quoted context omitted.

"I believe that with a framework like Angular it wouldn't have gotten out of hand like this," I disagree completely and in every possible way. This has been the hallmark of every new language/framework/coding philosophy/rant that has ever been made about coding in the last 30 years. And it's always wrong. It's wrong because it doesn't get the real issue: Your code is bad because you have multiple untrained developers…

> Your code is bad because you have multiple untrained developers just adding code to fix their current problems Yes, definitely! That is the core problem. My point, the one I obviously failed making, is that it's easier for an untrained dev to just add a line or two to a codebase where everything looks the same due to a lack of clear boundaries (modules, classes, whathaveyou). I had to sift through ~10k lines of JS…

After seeing this said numerous times about a number of different frameworks, I still disagree. The universe will invent a better idiot and your framework guarantees will make it even more difficult because they will find ways to subvert them and/or add in different modules from other frameworks. So while it might make it harder for people to screw things up at first glance, it will probably mean that when you inherit the code in 10 years time, they've managed to blow AngularJS's whole foot off and you're left trying to reconstruct the whole thing using tweezers.

I have only one thing to say to the poor future maintainers of AngularJS apps in the future. Godspeed.

Re: Angular JS Kinda Sucks

#58
It looks like a parody to me, too.

"First of all, I can do anything in jQuery, and have full control. Full control of the selectors, HTML, the DOM. I like that."

This could be rewritten as "First of all, I can do anything in Assembler, and have full control. Full control of the stack, registers, the memory. I like that."

Re: Angular JS Kinda Sucks

#59

Anything that forces users to have javascript on sucks, by definition. It's exactly the same as the all-flash or flash-heavy sites of the early 2000s and I can't wait until javascript-only sites are consigned to the same dustbin of "why did we ever think this was a good idea?". Edit: It also breaks search engine indexing.

why is that? almost all browsers support JS, it's like saying we shouldn't force users to have CSS!

If CSS isn't supported, a website should gracefully fallback to working in plain text.

http://motherfuckingwebsite.com/

Re: Angular JS Kinda Sucks

#60
Look, no one disagrees that learning angular and putting together an SPA requires a lot of brain power.

But creating a data-driven, non-trivial web app in pure jQuery is probably going to take much, much more.

Post reply on HN