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

  • To: "Costello, Roger L." <costello@m...>
  • Subject: Re: [Summary] Best Practice for URI construction?
  • From: Richard Lainchbury <freexe@g...>
  • Date: Wed, 21 Dec 2005 14:44:52 +0000
  • 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=A2QT4+7WPYYrefraKNXPxQPoYlHi5yIhvNHYs/f0kLLkwPF4MutAtwyCcPfUzqdNCTILKi4LCeeByTToRkai2gZgdnFd8RU8M4gqgQy/dOTrqriJn+MgjkuuCzH2A9BC0cVL41mwhP9RvVMYFMXQfWVYeF9NGv0LxZso8Jg+zX8=
  • In-reply-to: <B8415163A689094689542C617ECA03665836EE@I...>
  • References: <B8415163A689094689542C617ECA03665836EE@I...>

I would add, that when passing dates in the GET string ie:

www.example.com/news.php?date=2005/10/05

that you shouldn't use "/" as seperators as when going "up a
directory" it will try to locate:
www.example.com/news.php?date=2005/10/

and if you are using a folder structure
www.example.com/news/2005/10/04/
that the international date standard is used.

I would also say that each level should have the expected content in eg.
www.example.com/news/2005/10/ should have all the news articles from
october 2005 in.


Richard

On 21/12/05, Costello, Roger L. <costello@m...> wrote:
>
>
> Hi Folks,
>
> Excellent discussions!
>
> I have carefully read all the messages.  Below I have attempted to summarize
> what seem to be the conclusions of the group.  If I have totally missed it,
> please let me know.
>
> Issue: When constructing a URL, should the "path form" be favored, or should
> the "query form" be favored?
>
> Here's an example of the path form of URL construction:
>
> http://www.location.org/US/MA/Boston
>
> Here's an example of the query form of URL construction:
>
> http://www.location.org?country=US&state=MA&city=Boston
>
> Best Practice: there is no definitive "best practice" mandating a certain
> form should always be be used when constructing a URL.  Always consider the
> whole system when constructing a URL.  That said, there are some general
> guidelines to follow when constructing URLs:
>
> 1. When hierarchy is intrinsic in the identification (naming) of a resource
> then favor the path form of URL construction.
>
> Example: Boston is within Massachusetts, which is within the USA.  There
> exists a natural hierarchy in the identification (naming) of the Boston
> resource.  Thus, the path form of URL should be favored, e.g.,
>
> http://www.location.org/US/MA/Boston
>
> This query form is less favorable:
>
> http://www.location.org?country=US&state=MA&city=Boston
>
> This hybrid form is also less favorable:
>
> http://www.location.org/US/MA?city=Boston
>
> 2. When there is no intrinsic hierarchy in the identification or naming of a
> resource then the query form is favored, e.g.,
>
> Boston may be identified by its latitude and longitude (42.358N, -71.06W).
> There is no intrinsic, natural hierarchy between latitude and longitude.
> So, when using the latitude and longitude to identify (name) the Boston
> resource then use the query form:
>
> http://www.location.org?latitude=42.358N&longitude=-71.06W
>
> Comments?  /Roger

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