URI Opacity

| | Comments (0) | TrackBacks (0)

One common myth is that REST based systems require that URIs are opaque.  This is not the case on the Web or in REST.  A server may inform a client that there is structure in the URI by means of referencing a specification(s) that specify the structure within a representation.  An example of this is HTML Forms, where the HTML specification defines a mapping of form parameters into URIs for HTTP Get requests.  

The W3C TAG answered this question in http://www.w3.org/2001/tag/doc/metaDataInURI-31.html

with

Assignment authorities may publish specifications detailing the structure and semantics of the URIs they assign. Other users of those URIs may use such specifications to infer information about resources identified by URI assigned by that authority.

 

Roy answered this question in

http://tech.groups.yahoo.com/group/rest-discuss/message/5369 with

"Clients are allowed to treat a URI as being structured if that structure is defined by standard (e.g., scheme and authority in "http") or if the server tells the client how its URI is structured.

 

What is opaque is the client's view of the URI when it is processing a request.  The advantage is well said in:

"Ignoring any semantically significant data in a URI allows operations on a resource to be orthogonal to identification of the resource."

 

Having said that URIs are not necessarily opaque, URIs ought to be chosen that enable a human to guess about the meaning as well as guess other URIs.  As said by the TAG

"Users therefore benefit from the ability to infer either the nature of the named resource, or the likely URI of other resources, from inspection of a URI"

 

The caveat is that such assumptions may be incorrect and the user needs to guard against incorrect assumptions. 

 

We will not concern ourselves with the academic possibility that the Web architecture is not aligned with the REST thesis, nor that Roy's statement is an incompatible alteration or versioning of his thesis.

 

Some further discussion is at http://microformats.org/wiki/rest/opacity

0 TrackBacks

Listed below are links to blogs that reference this entry: URI Opacity.

TrackBack URL for this entry: http://www.pacificspirit.com/cgi-bin/mt/mt-tb.cgi/197

Leave a comment

About this Entry

This page contains a single entry by Dave Orchard published on March 11, 2008 10:55 PM.

MSFT supports latest standards mode in IE 8 was the previous entry in this blog.

Multiple births benefits being revisited is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Categories