Hacker News new | past | comments | ask | show | jobs | submit login

John didn't invent REST (nor AJAX), however jQuery made it feasible and easy for people to use.

Yes, you're right, the best jQuery would be no jQuery. jQuery was basically a prototype for the next generation of browser features.




It didn't encourage REST either. It provided $.post but not $.del (since delete is a keyword in JavaScript) so one could even say it went against REST. I think it was orthogonal to REST, though.

Here's the docs for jQuery 1.3 from when REST was starting to take off, with jQuery.post but no delete method: https://api.jquery.com/category/ajax/shorthand-methods/


It provided $.ajax({method: “DELETE”}) however... so...


Making a DELETE XHR was never the issue, browser support was. It's an issue that was impossible to paper over with a JS library alone, you needed backend integration. That's why Rails and similar frameworks at the time spoofed DELETE and PUT requests by creating a POST request with a special param set.


All browsers supported the verbs for years. IE7 had mostly full support (not PATCH though, annoyingly).

The problem was mostly backend related: most servers didn't support them. DELETE for example has been supported for over 12 years in all major browsers.


Ah, interesting, my memory is dusty. Now that I think about it, the limitations of <FORM> were front and center too: A Rails app wanted a "delete $X" page that didn't rely on JS, and the only way that was going to happen was with a <FORM>, which only supports GET and POST methods.


Ah well yes. That’s quite intentional of course but yeah, an architectural limitation of that Rails app.

Of course until ~v3 Rails didn’t fully support all verbs so...


It was also an issue on backends. Backbone had an emulateHTTP option: http://backbonejs.org/#Sync-emulateHTTP


REST had taken off before jQuery existed.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: