News for hackers. Stuff that matters.
Re:How do I “think in AngularJS” if I have a jQuery background? by gohrt on Thursday July 25, 2013 @03:13PM (#6104349)
This answer convinces me to prefer jQuery for apps that aren't Facebook or Gmail.

It has an "architecture astronaut" feel (explicitly eschewing graceful degradation!), which most web pages don't need.

I'd be interested in "controller" plugins for jQuery, so I can opt into upgrading from trigger->DOM to trigger->controller->DOM as my app grows.

Re:How do I “think in AngularJS” if I have a jQuery background? by macspoofing on Thursday July 25, 2013 @05:39PM (#6105178)
It shouldn't. AngularJS should work great in most situations, even for simpler pages. I'm a big fan of MVVM pattern as it lends itself to a hard separation between the nitty-gritty view details (e.g. effects, transitions, styles, etc.) and the rest of your business logic. Create your view, declare how it should behave based on view-model values and then hook it up to your core business logic that is now completely agnostic to your view details. jQuery, on the other hand, forces you down the path where your business logic needs to care about how the view should render the content, and those ugly view details are sprinkled all over the place.
Re:How do I “think in AngularJS” if I have a jQuery background? by wwweston on Friday July 26, 2013 @03:58AM (#6107099)
Forces?

Angular is pretty cool, but it's hardly the only neat way of seperating and offloading view detail work.

And jQuery is just a (much) nicer-than-native DOM/browser API. It doesn't provide an application architecture or data bound view handling layer because that's not what it's for, and it no more forces an application style than your text editor does.

This isn't to say that Angular isn't nice for projects short of Gmail's scale (I would/am considering it for some small scale stuff), it just doesn't make much sense to say jQuery forces people a direction by not providing features that aren't really part of its purpose.

Re:How do I “think in AngularJS” if I have a jQuery background? by macspoofing on Friday July 26, 2013 @12:29PM (#6109030)
You can write maintainable code in any language, but certain languages, frameworks, and libraries lend themselves to certain patterns. It's very easy to do the wrong thing with jQuery.
Re:How do I “think in AngularJS” if I have a jQuery background? by axelf on Thursday July 25, 2013 @03:33PM (#6104484)
I consider Separation of Concerns, Dependency Injection, and TDD to be basic software engineering principles. Sure if you have a mostly static page with a few dynamic components jQuery will work fine, but with a larger project that you really need to consider a more maintainable architecture.
Re:How do I “think in AngularJS” if I have a jQuery background? by mattmcknight on Thursday July 25, 2013 @11:58PM (#6106495)
"Separating configuration from use" is the principle, and dependency injection is one of many patterns used to aim for that... http://www.martinfowler.com/articles/injection.html#Separati...
Re:How do I “think in AngularJS” if I have a jQuery background? by smrtinsert on Thursday July 25, 2013 @05:37PM (#6105167)
Absolutely. Honestly it seems to fly really far with the node youngsters who want to code all night for some reason. What you're talking about is event delegation. It's a one liner practically, but shh, we're talking about "architecture" now.
Re:How do I “think in AngularJS” if I have a jQuery background? by macspoofing on Thursday July 25, 2013 @05:48PM (#6105229)
AngularJS is an MVVM framework. It's fairly new to JS and front end web development, but not that new for UI development in general (it's been around since 2005 in WPF and used in Silverlight and Flex applications, and possibly others). It isn't just 'event delegation'.