News for hackers. Stuff that matters.
Re:Why It's Time to Sunset jQuery by dwyer on Sunday April 14, 2013 @02:32PM (#5547700)

    url: "test.html",
is clearly not equivalent to

    var age = document.getElementById('age').value;
    var wpm = document.getElementById('wpm').value;
    var sex = document.getElementById('sex').value;
    var queryString = "?age=" + age + "&wpm=" + wpm + "&sex=" + sex;
    ajaxRequest.open("GET", "ajax-example.php" + queryString, true);
so your example reeks of hyperbole.

The first piece of code is GET'ing an arbitrary, presumably static webpage and injecting the word "done" into the body, while the second piece of code appears to be pulling data from a form, sending it to another webpage, and then displaying its response into a specific div.

As for the try/catch statements, I think the OP's point is that we don't need to worry about XMLHttpRequest failing anymore. The decision to support IE6 is up to you, but I think most web developers are willing to draw the line these days.

Re:Why It's Time to Sunset jQuery by psherman on Sunday April 14, 2013 @03:21PM (#5547912)
Assuming you give your form elements names and the form an ID (unlike in the linked example) its trivial to get the query string using serialize and you don't have to fuss around with string formatting if you modify the form.

    $.ajax({
      url: 'ajax-example.php',
      data: $('#myForm').serialize(),
      success: function(data) {
          $('#ajaxDiv').html(data);
      }
    });
Re:Why It's Time to Sunset jQuery by neya on Sunday April 14, 2013 @02:49PM (#5547782)
Yes, your argument is fair, but I just wanted to give you a fair idea of writing code in Jquery vs plain JS. Also, think about cross browser support - Why re-invent the wheel? There will always be some missing features that will not be compatible uniformly across browsers and hence the need for frameworks like Jquery.