News for hackers. Stuff that matters.
Re:JavaScript: The Right Way by TheZenPsycho on Friday January 17, 2014 @05:37AM (#7075142)
Plain javascript is nice, but if you're talking about getting a single bit of code to work in N many browsers, the "frameworks" start becoming less optional.
Re:JavaScript: The Right Way by coldtea on Friday January 17, 2014 @06:17AM (#7075226)
Actually the frameworks don't help in that regard. They are meant for organizing your code, they don't offer any special compatibility.

jQuery does that.

Re:JavaScript: The Right Way by TheZenPsycho on Friday January 17, 2014 @06:36AM (#7075281)
Well let's define some terms here then. In the sense that I was speaking about, I was using "framework" as a synonym for "library". Not an entirely unprecedented usage.

Underscore gives you array extras in every browser, even ones that don't have array extras.

Mustache because let's face it, javascript doesn't have any nice way of doing templating or string formatting or anything. not without resorting to doing things that might not work in every browser.

and backbone because, while some of the newer browsers and newer versions of ecmascript provide facilities for monitoring and reacting to changes, and doing data binding like things natively, not all browsers do.

now I'll admit that backbone is not as new and shiny as say, that om/react/clojure stack making the rounds on hacker news, it's been around for a few years and it's still here. So that's something.

Re:JavaScript: The Right Way by coldtea on Friday January 17, 2014 @10:01AM (#7076064)
>Not an entirely unprecedented usage.

Well, not a valid usage either given the context. From the examples you give, the only fitting one is Backbone, and even that it's stretching it a little (nobody uses the ES6 monitoring/reacting facilities directly atm, so it's not like Backbone gives them compatibility for them, it's like it provides them in the first place).

Re:JavaScript: The Right Way by TheZenPsycho on Sunday January 19, 2014 @03:52AM (#7083890)
What does XCODE call a "library"?

… a framework.

Re:JavaScript: The Right Way by jrub on Friday January 17, 2014 @09:28AM (#7075887)
and underscore. not for DOM, but for some functional compatibility (map, forEach, etc). Plus, it's convenience methods quickly become indispensable.

_(fn).bind(this), anyone?

Re:JavaScript: The Right Way by rgbrgb on Friday January 17, 2014 @12:50PM (#7077229)
Uh oh, I've been using fn.bind(this) everywhere. Is there a linter that will warn me when I'm not using cross-browser supported js?
Re:JavaScript: The Right Way by TheZenPsycho on Friday January 17, 2014 @05:26PM (#7078885)
it's called IE7. Any feature that's not cross browser supported is guaranteed to not be supported in IE7. A.K.A. lowest common denominator.

Very soon to be IE8.