Archive for February 2009
Platonic Form URIs
I knew about URI but I never encountered a term “Platonic Form URI” until yesterday. I found the term floating around the net especially on couple of blog posts that I usually read. As usual, curiosity caught me again to know more about it. So after getting my hands bit dirty, here are some details/of my understanding about Platonic Form URIs in the most high level or simplistic form.
Lets brushen up some details that we already knew before we get into the details as that would even help for a better flow of the post.
URI
So we all know what’s an URI is. Simply put, it is a string that identifies a resource. For example, the following is an URI.
The above URI helps me to identify the Google’s search page which is ofcourse in this case is a resource. Please note, identifying the resource may not necessarily mean that we can retrieve it.
URI with Application State
To understand “URI with Application State”, lets take a simple example. Say I am trying to access the first page of my blog and assume that the URI for reaching there is,
http://www.myblog.com/V4forums?page=1
and my retrieved first page on a web browser not only contains the resource, but, in the footer, has also got a link to navigate to my second page. The URI for the second page is presumably,
http://www.myblog.com/V4forums?page=2
Now I would say, both the above URI’s were not just identifiers but also were holding the application state. For instance, If I forward the URI of my second page to a friend of mine, on clicking, he would directly taken to my second page instead of landing him on my first page and force him to click on some link in my footer. Its because the URI has got an application state with it. In this case, the portion of URI that preserves the application state is ‘?page=2’.
URIs behaving Platonic
Now I’ve got a problem with representation part of my blog page which was reported by one of friends to whom I forwarded the link. My friend knows only French but I have configured the blog to represent my resource in english, by default. Neither the URI that I sent to my friend has got any information on what type of language he prefers.
At this juncture I can call my URI having a Platonic Form ie., devoid of any language specifics. One of the synonyms form Platonic in WordWeb displayed, “free from physical desire“.
Hope we understood what Platonic Form URI’s are.
But I am yet to find a solution for my friends problem. So here’s what I’ve got. I changed the configuration of my blog to check the header content of every request that is coming in to identify the browser preference language and sent back the appropriate response/resource for my second page.
Ideally, there are much better ways of handling this problem than using the header content to identify more details which goes beyond the scope of this blog post. So I leave you on your own to go and figure out the other solutions.
Download “Ubuntu Pocket Guide” Free of Cost
Keri Thomas’s Ubuntu Pocket Guide is now available for free in PDF format.
The original paper edition cost $9.94 in amazon.
The free pdf version can be downloaded from:
http://www.ubuntupocketguide.com/index2.html
So what are you waiting for, download a copy and become a Ubuntu master in double-quick time.