4 ms·
Well I've created what I believe to be, and what this article describes twice now for internal web-services[1]. Its really quite easy if you are disciplined and
by peregrine 15y ago
Well I've created what I believe to be, and what this article describes twice now for internal web-services[1]. Its really quite easy if you are disciplined and it really ends up being a very nice interface. The trick becomes if you want to eat your own dogfood with a website. Since forms can only post and get it makes it tricky without JS.
Otherwise I've been very happy and content with my 100%[1] restful webservices.
[1] According to this article, the one it linked to, and a medium skimming of the original dissertation.
- aGHz 15y agoAre you just HTTP-compliant (using the proper verbs and having Uniform Resource Locations point to actual resources) or are you truly 100% restful?
- peregrine 15y agoI suppose looking back I do have a concept of a session which is state. So no, but I organized my verbs and URL's to meet the specification and have the option to remove those sessions. But I guess since I'm using a cookie-based sessions its less of an issue for state changes since the state stays mostly on the client.
- mikaelgramont 15y agoAgreed. Sessions and the limitations of forms are the biggest obstacles to 100% restful APIs used from web browsers.
- NanoWar 15y agoYou can however use XHR form submission[1] in the background (which is a good practice (better site responsiveness) after all) to use HTTP methods other than GET and POST. [1] e.g. http://jquery.malsup.com/form/#json http://jquery.malsup.com/form/#json