Hacker News new | ask | show | jobs
Developing small JavaScript components WITHOUT frameworks (jack.ofspades.com)
1 points by jacopotarantino 3710 days ago
2 comments

> WITHOUT frameworks

But... but... jQuery? :D

Anyways, in real-world development, jQuery is still the #1 go-to tool. A little above vanilla, but not too much abstraction. It's just right.

By the way, there's

- fetch to replace that old XHR. (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)

- Promises which should come with fetch, and also replace success and error callbacks in jQuery (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...)

- document fragments to create DOM elements and do manipulation in memory. (https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...)

This is one of my preferred methods of development.

I use jQuery because I'm not worried about the 40kb and I'll take all the free backwards compatibility I can get. Besides it'll inevitably be a dependency for one of the libraries you want to use.

If my templates start getting complex I've been known to use Jade templating with Jadeify.