What am I not understanding about REST?

Am I locking myself out from taking advantage of some standard if I dont’ use these?

You are yourself locking out from the HTTP standard. Of course you can use GET parameters to do the same thing. It’s just not REST then, but something RPC-Like.

May I suggest the book RESTful Web Services by Leonard Richardson and Sam Ruby? It’s quite fun to read and shows differences between the different approaches.

To answer your questions in a bit more detail: It’s up to you to decide which way you go. In theory you can do all the same stuff with both RESTful and RPC-like approaches. With RESTful you use the underlaying HTTP protocol to be the protocol. With RPC you use HTTP just as a means of transportation and hide the work orders somewhere in the transported data. That leads to (unrequired) overhead.

Just look at two of your examples:

  • /books.php?action=add&title=AdvancedRuby&description=….&securityId=923847203487
  • /books.php?action=delete&id=342&securityId=923847203487
    • There’s POST and PUT or DELETE, why have action=add and action=delete?
    • There’s HTTP authentication. Why invent a – possibly less secure – securityId?
    • BTW: You shouldn’t allow changes to data via GET. That’s just something that shouldn’t be done (another topic, though 😉 )

Leave a Comment