4 ms·
Developing small JavaScript components WITHOUT frameworks
- bigmanwalter 10y agoThis 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.
- lollipop25 10y ago> 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 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/Reference/Global_Objects/Promise 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/DocumentFragment https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...)