4 ms·
If in doubt, just use Javascript without anything. Maybe add jQuery. All those frameworks may be nice, but as soon as the tools get a distraction, I think it i
by onli 13y ago
If in doubt, just use Javascript without anything. Maybe add jQuery.
All those frameworks may be nice, but as soon as the tools get a distraction, I think it is useful to step back. And JS doesn't really need anything to be useful.
- Torn 13y agoI'd say underscore needs to be there too
- kops 13y agoAnd this is exactly how it starts :-)
- coldcode 13y agoAnd it never ends :-)
- morganherlocker 13y agoCorrect, the performance of lodash definitely makes it the better choice. :)
- acjohnson55 13y agoThese days, think Lodash is the better pick.
- TheZenPsycho 13y agoPlain 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.
- coldtea 13y agoActually 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.
- TheZenPsycho 13y agoWell 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.
- coldtea 13y ago>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).
- TheZenPsycho 13y agoWhat does XCODE call a "library"? … a framework.
- jrub 13y agoand underscore. not for DOM, but for some functional compatibility (map, forEach, etc). Plus, it's convenience methods quickly become indispensable. _(fn).bind(this), anyone?