Blogger: Anne Thomas Manes
Check out this excellent discussion about the Tao of REST:
Jon Udell initiated the discussion in his post about the REST API now offered by the World Bank. Stefan Tilkov responded with a post of his own by expressing his dismay regarding the unwieldiness of the URLs used in the API (they tunnel verbs through the URL). Jon concurred with Stefan that the API could be webbier.
The responses to Jon's second post are particularly interesting.
Miguel de Icaza's comment causes me to ruminate:
"My friend Nat was wondering about this data the other day, and since this is all static data the question is: why was this data not published merely as a Sqlite database dump?
Do we really need a REST web service to static data when we already have a good query and mining language?
Maybe the only use of this REST API is to download all the data and stick it into a SQL database ;-)"
Miguel's questions brings to mind a conversation I had recently with Peter O'Kelly regarding an emerging data model: hypermedia, which is webby and RESTful at a fundamental level. The hypermedia data model is essentially a flat data model (i.e., no predefined hierarchical or tabular structure), and it uses hyperlinks to express relationships within the data. Every data item (or collection of data items) is identified by and accessed via a URL, and any data item can express a relationship with any other data item via a hyperlink. I think this model is much more expressive than a data model that relies on primary and foreign keys to express relationships. The question of static or dynamic content doesn't really come into play from this aspect. The data model determines what means you have at your disposal to access and navigate your way through the data. Perhaps underneath the data might be managed in a SQLLite file. On the other hand it might just be an indexed file or an enterprise-class DBMS or data generated by an aplication. As Stefan said in his reply to Miguel:
Once nice aspect of good URI design and a REST approach that deserves the name would be that you couldnât tell whether the data is kept statically, generated dynamically, or some arbitrary mixture.



Comments