Wednesday, June 16, 2010

URI VS URL

some of my colleagues asked me about the URI Vs URL. I was thinking to make it clear for everbody. Here is my explaination:

URI:
A URI identifies a resource either by location, or a name, or both. More often than not, most of us use URIs that defines a location to a resource. The fact that a URI can identify a resources by both name and location has lead to a lot of the confusion in my opionion. A URI has two specializations known as URL and URN.


URN
A URI identifies a resource by name in a given namespace but not define how the resource maybe obtained. This type of URI is called a URN. You may see URNs used in XML Schema documents to define a namespace, usually using a syntax such as:



URL

A URL is a specialization of URI that defines the network location of a specific resource. Unlike a URN, the URL defines how the resource can be obtained. We use URLs every day in the form of http://damnhandy.com, etc. But a URL doesn’t have to be an HTTP URL, it can be ftp://damnhandy.com, smb://damnhandy.com, etc.

In the last word, we can say that URI is identifier of resource and URL gives us information to obtaine this resource.

if URL present our homepage then each object can be retrieved from the homepage by using the URI ( ex. URL and URI of Ahsan (www.ahsanmorshed.bloger.com and ://ahsanmorshed.blogger/ahsanmorshed )