4 ms·
REST was Roy Fielding but I agree. Much like the concept of Apache Cordova, the best jquery would be no jquery at all.
by thinkingkong 8y ago
REST was Roy Fielding but I agree. Much like the concept of Apache Cordova, the best jquery would be no jquery at all.
- gkoberger 8y agoJohn 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.
- benatkin 8y agoIt 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/ https://api.jquery.com/category/ajax/shorthand-methods/
- anothergoogler 8y agoREST had taken off before jQuery existed.
- abritinthebay 8y agoIt provided $.ajax({method: “DELETE”}) however... so...
- anothergoogler 8y agoMaking 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.
- benatkin 8y agoIt was also an issue on backends. Backbone had an emulateHTTP option: http://backbonejs.org/#Sync-emulateHTTP http://backbonejs.org/#Sync-emulateHTTP
- abritinthebay 8y agoAll 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.
- anothergoogler 8y agoAh, 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.
- abritinthebay 8y agoAh 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...