News for hackers. Stuff that matters.
Re:10th Anniversary of JQuery by ergothus on Thursday January 14, 2016 @02:42PM (#10903866)
Actually, I don't think the chainable API is terribly important.

The things that keep jquery alive and well in mind are:

* A convenient way to add to the DOM. While SELECTING elements has gotten way better than the Bad Old Days, ADDING elements is still painful. (one element isn't bad, but if you're trying to add, say, a UL with a number of LI elements, it's...tedious.)

* A good wrapper for Ajax calls. Not that there aren't better, but jquery has a perfectly good one. Heck, I've jqueryified a page to test calls I'm making outside of jquery because doing a call via console is...tedious.

* Promises. We'll soon have them native (and better), but for a long time jquery has been super convenient for this.

Re:10th Anniversary of JQuery by skrebbel on Thursday January 14, 2016 @03:12PM (#10904088)
for HTTP calls from the console, you might appreciate the relatively new fetch api:

https://developer.mozilla.org/en/docs/Web/API/Fetch_API

if you ask me, it's impressively well designed. it looks so boring and straight forward yet somehow nearly all "simple" http libraries (not to mention builtins) in nearly all popular languages are more convoluted.

Re:10th Anniversary of JQuery by amirmansour on Thursday January 14, 2016 @03:32PM (#10904242)
I'm really greatfull for the new Fetch API. For now we need to use a pollyfill for it which just uses XHR underneath. Safari and modern versions of IE/Edge are lacking support.
Re:10th Anniversary of JQuery by ergothus on Thursday January 14, 2016 @03:49PM (#10904370)
Thanks! I didn't know this was actually out there yet, awesome.
Re:10th Anniversary of JQuery by BinaryIdiot on Thursday January 14, 2016 @03:47PM (#10904350)
> Actually, I don't think the chainable API is terribly important.

jQuery's API is chainable; that's all I meant by it. Their API overall just simplifies everything. I'd like to see the standards committees take ideas from development trends and work to simplify the DOM API.

Honestly as far as AJAX goes I really think HTTP needs to be put into the JavaScript standard itself; not just the HTML standards. It's hard finding good libraries that can make HTTP calls in the exact same way in both the browser and node (which is important to me because much of my library type code can run in either environment). I had to write this myself and while my implementation is limited it makes my life easier.

Re:10th Anniversary of JQuery by DCoder on Sunday January 17, 2016 @01:46AM (#10918584)
> Promises

Careful with that axe... Before jQuery 3.0, its promises API is not compatible with the Promises/A+ spec: http://stackoverflow.com/q/23744612/1233508

If you're used to jQuery's promises, you can be in for a few surprises when trying to use other libraries (or even when updating to jQuery 3).

Re:10th Anniversary of JQuery by LoSboccacc on Thursday January 14, 2016 @04:21PM (#10904576)
I've recently switched from jQuery to mustache to create elements for DOM insertion; I like that a lot, especially because it works linearly like a good old library, instead of being a huge ass framework - it's a good fit for the programming model.