Sunday, August 10, 2008

Discovering RESTful APIs

Read up today on REST APIs. See this introduction for specific details. Here I'm just going to give my opinion.

The idea behind the REST style is appealing in its simplicitly. I can see Many ways in which rigorously following the style would produce an easy to understand API, provided the user (client) is also familiar with the style. We've all become so used to treating GET and POST in HTTP as equivalents that we don't even think about how we might be abusing the intent. I never did understand the intent behind the separation of GET, POST, PUT and DELETE until now, and even now that understanding is arguably superficial.

REST provides a set of constraints over an API. Does it make sense to have a framework for supporting REST style APIs? Would the framework do anything beyond providing constraints on the behavior of the various HTTP verbs? How would such constraints be encoded? A lot of food for thought here.