It’s a RESTful World

Web developers have many options to choose from when it comes to web services. These options include SOAP, XML-RPC, and REST. It is my opinion that REST will emerge as the primary web services “protocol.” The advantages and disadvantages of each protocol is a topic that has been discussed to great length online. Here are the primary reasons why I think REST has the advantage:

  • REST is simple. Time and time again, simple has won on the web. The web itself is successful because of its simplicity. People are really good at making things more complicated than they need to be (which is why we have SOAP).
  • REST builds on the simple concepts that make the web work. URLs are resources/nouns that can have HTTP methods/verbs such as GET, POST, PUT, and DELETE applied to them.
  • It does not dictate what the actual data will look like. This is seen as a weakness by many but why should this be the domain of the web service protocol? Here you can pick what works best for the data you are communicating. Perhaps XML defined through XML Schema, DTD, or RELAX NG is best for a particular use case. Maybe you’d prefer to use JSON instead. Maybe you simply want to use (X)HTML and microformats. Maybe you’re dealing with binary data that isn’t machine-readable such as images or PDFs. If it can be represented by a URL and can be gotten (GET), posted (POST), put (PUT), and/or deleted (DELETE) it’s RESTful.

Here is some interesting reading on REST:

One Trackback

  1. By HTML 5, HTTP Methods & REST – Bradley Holt on February 6, 2010 at 8:36 pm

    [...] talked about REST here before but REST is useful for more than just building web services. REST is an abbreviation [...]