Comment

Comment by flying-sheep

Basically it boils down to what you want to do.

If you know you’re replacing many parts of your page with data you have to load, use a framework like angular, backbone, ember, …

If you visualize data, use d3.

If you need to animate some UI elements but don’t need much else, use jQuery.

Else use plain JS, maybe with some shortcuts like function $(sel) { return document.querySelector(sel) }. maybe with underscore.js if your love funtional programming.

In any case, strive to write idiomatic code. d3, jQuery, and many else e.g. have their own variant of $, select, querySelector, … – decide on one framework and use its way to write code.

Any you’ll want to find a way to compartimentalize code. https://github.com/mbostock/smash is good, and http://browserify.org/

parent flying-sheep 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton