top | item 7522723

(no title)

pilgrim689 | 12 years ago

A tool doesn't fail because it's difficult, it fails if its difficulty is not worth the results it produces. A chainsaw is more difficult than a plain old saw. You gotta make sure it's fueled up, oiled and whatnot. You might even have to read instructions the first time! But is it worth it? That's the question, and it goes completely unaddressed in this post.

discuss

order

robmclarty|12 years ago

Exactly. If you don't want to burden your little head with OPAs and APIs and application architectures, just stick the jQuery and happily manipulate the DOM here and there as you see fit. If you want to make something bigger, something more app-like (in your browser), something that's not merely a web page, you're going to need some structure like that found in an MVC framework.

Coming off working on a large Backbone app, I've seen how bloated, needlessly repeated, and painstakingly verbose things can get. Angular solves a lot of the problems I have with Backbone by taking care of basic plumbing for me so I can focus on the unique parts of my app. It's magical, but that's what I want in a framework: less pounding out boilerplate and more writing application code.

Cthulhu_|12 years ago

Pretty much this. Angular isn't there to replace jQuery or do simple things that can be done in minutes in jQuery; Angular's for building applications. I like the analogy in the first comment on the page itself.

The article links to another page where the author rants about why Angular sucks; the second paragraph already indicates the author is trying to do direct DOM manipulation, which is exactly what Angular tries to prevent you from doing. It's an abstraction layer (amongst other things).

tl;dr I wonder if the author ever worked on a production-sized single page application.

SideburnsOfDoom|12 years ago

I get the feeling that this article author doesn't get it. I can't say quite what they are missing, but I have a nagging feeling that they are missing something very basic.

I find it quite easy to add a small feature to the existing angular app. And it's modular so the app's complexity isn't snowballing. And the new feature is covered by unit tests. Could you say the same for a jQuery app? If "yes", did it need heroic measures? This just falls out of the default angular app template. For the first time I feel that the client-side approaches the engineering rigour that we have on the server.

It's the opposite of the "spaghetti nightmare" mentioned. I'm sure you can tie yourself in knots of code with angular, but you can also avoid it.

hrjet|12 years ago

Minor aside, I like the chainsaw metaphor and use it a lot when thinking about programming tools and languages.

Before choosing a tool / language, I check if the task is to (metaphorically) cut a single tree or an entire patch of trees. If the answer is former, I choose an axe (a simpler tool), else I stick with the chainsaw no matter how difficult it gets, as it will pay in the long run.