[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Costello, Roger L." <costello@m...>
  • Subject: Re: Best Practice for URI construction?
  • From: bryan rasmussen <rasmussen.bryan@g...>
  • Date: Fri, 9 Dec 2005 15:35:30 +0100
  • Cc: XML Developers List <xml-dev@l...>
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E30JFvsvHMenZ7Kcahaqcyhe+ty+I5zH5eb/hA+kCNz1fIF3rM6YbdXsMdwNv+G4BpRoUk89e4lwvMe3QVeCml8r0VmQnQ7KMdWKnnVZDWaGraN0teZLTQi8vbaFOhGb9JFs9jRfirl0C58bNb1/qV12KfnSm6S+6/7WBpZ0zAk=
  • In-reply-to: <B8415163A689094689542C617ECA036650F585@I...>
  • References: <B8415163A689094689542C617ECA036650F585@I...>

The querystring, despite sometimes usage, is not according to
specification for referring to different resources.

This http://www.location.org/US/MA?city=Boston

refers to US/MA

city=Boston is a property of US/MA.



On 12/9/05, Costello, Roger L. <costello@m...> wrote:
> Hi Folks,
>
> A URI is used to "identify" a resource:
>
> A Uniform Resource Identifier (URI) is a compact sequence of characters that
> identifies an abstract or physical resource.[1]
>
> I would like to bound the following discussion by considering just URLs that
> use the http scheme.
>
> As I see it, there are two main approaches to constructing a URL to identify
> a resource:
>
> Approach 1. URL Construction using Parent/Child Relationships
>
> Here's an example of a URL that uses this approach:
>
> http://www.location.org/US/MA/Boston
>
> After the [host] (www.location.org) there are a series of slash-delimited
> names.  The name to the left of a slash is the parent.  The name to the
> right of a slash is the child.
>
> Approach 2. URL Construction using Key-Value Pairs plus Conjunction
>
> This second approach is exemplified with this URL:
>
> http://www.location.org?country=US&state=MA&city=Boston
>
> After the [host] there is the query string delimiter (?) followed by one or
> more key=value pairs ANDed together.
>
> Hybrids of the above two approaches are also possible.  For example:
>
> http://www.location.org/US/MA?city=Boston
>
> Questions
>
> (1) The above URLs (I believe) are expressing the same thing - they are
> identifying the same resource.  So which is "better"?
>
> (2) As was noted at the top, the purpose of a URL is to "identify" a
> resource.  Can every resource in the universe be identified using the above
> two approaches?  Are there resources that do not lend themselves to
> identification using the above two approaches?
>
> /Roger
>
> [1] http://www.gbiv.com/protocols/uri/rfc/rfc3986.html
>
>

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member