Thursday, 9 July 2015

what is the difference between URL,URI and URN

before going into URL,URI and URN
you need to know some background. Do you ever thought about, who decides what is URL? and what is URI? or who is the authority for URL, URI and such naming conventions?

W3C and IETF

There are two separate bodies W3C and IETF. The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. The specifications for URI and URL are defined by W3C.
It was founded and headed by Sir Tim Berners-Lee. He is one of the greatest scientist living now. He created this www model of server and client architecture, a web server serving web pages through network and client browsers reading it. He did it first when he was with CERN. He created the world’s first web page http://info.cern.ch/ . He was also in HTML 2.0 working group of IETF. So it is very appropriate for W3C to define URI and URL.
Internet Engineering Task Force (IETF) is an open international community working on Internet related standards. In general it addresses issues of Internet protocols.
In particular W3C defines the web, html specifications and related information. IETF defines IP, TCP, or DNS, for security at any of these levels; with SMTP or NNTP protocols.
So the stake for definition for URI and URL is with W3C. But as there is only a thin line between these organisation’s work they tend to cross each other. In some place IETF gives dissimilar definition for URL and URI.
If you read through the huge volume of journals available in web for this topic, you can sense that experts :-( are using URI and URL synonymously. Which is causing all these confusion among the web community about URI, URL and URN.

URI

URI stands for Uniform Resource Identifier. URI is a text which is used to identify any resource or name in Internet. URI has two specialization in form of URL (Uniform Resource Locator) and URN (Uniform Resource Name) to identify resource and name. We mostly see examples of URL and URN in real word. If you are working on JSP and familiar with using tag library e.g. displaytag and JSTL core tag library, then you may remember use of URI to locate binary corresponding to a tag library.


URL

URL standards for Uniform resource locator and it is a subset of URI or Uniform Resource Identifier. URL includes location as well as protocol to retrieve the resource e.g. in http://javaforocpjp.blogspot.sg/2015/09/difference between url.html, HTTP is a protocol which can be used to retrieve resource difference between url.html available in location http://javaforocpjp.blogspot.com directory. It's not necessary that URL always include http as protocol, it can use any protocol e.g. ftp://, https:// or ldap://.

URN

URN stands for Uniform Resource Name. URN is also subset of URI. One of the best example of URN is ISBN number which is used to uniquely identify a book. URN is completely different than URL as it doesn't include any protocol.


No comments:

Post a Comment