Scott Andrew - lo-fi acoustic pop superhero!

Join the Demo Club to unlock new music, get discounts, tour dates and other neato stuff:

or learn more here.

April 19, 2002

More on REST

I’ve been learning and thinking a lot about REST (Representational State Transfer) and how it stacks up to RPC-based technologies like SOAP and XML-RPC. The idea behind REST is that the Web already has everything it needs to power XML-based, transactional Web services — HTTP-native actions such as GET, POST, PUT, DELETE, etc. applied to a “potentially infinite set of nouns (URIs).”

The REST view is very seductive in its simplicity. In fact, most RPC operations can be mapped to REST equivalents. From the RESTWiki:


- when retrieving information without changing the state at the server, use GET

- when explicitly setting some piece of state on the server, use PUT
- for pretty much everything else that changes state at the server in a loosely coupled way, use POST
- for other operations that change state on the server in an early-bound manner (i.e. the client needs to know explicitly what is happening), define a new HTTP method.

What about structs and complex datatypes? REST doesn’t require a schema, so you use any one you wish. Things get a bit tricky when you get into things like discovery of services and methods, because at some point you need to know how to find and get at a Web service’s inner workings. As a developer, probably the most obvious benefit I see is you don’t need much to get started, no crazy tools, no SOAP::Client, etc. All you need is something that can handle HTTP and parse an XML payload. In other words, you need less glue.

More on this later, as I learn.

No Comments

Leave a Comment

Close
  • E-mail
  • Social Web

Email this page to a friend:

E-mail It

Buy Music

Download Scott Andrew tracks from iTunes Find Scott Andrew at Rhapsody Find Scott Andrew at Amazon Find Scott 
Andrew at CD Baby Find Scott Andrew at Napster Find Scott Andrew at Emusic

More Options

New Videos

More Videos

Photos

More Photos at Flickr

Recent Reader Comments

  • Hotrod Cadets: Hi Scott, and happy new year! Just a quick note...
  • Lz: One thing you have to keep a careful eye on when m...
  • jim: Scott you are a giant among men.
  • Stani Steinbock: Yeah! This song brought tears to my eyes. Touched ...
  • spinhead: that's just grade 'a' awesome and I don't even use...