0

From the page http://msdn.microsoft.com/en-us/magazine/dd315413.aspx:

User agents interact with resources, and resources are anything that can be named and represented. Each resource can be addressed via a unique Uniform Resource Identifier (URI).

is www.me.com/page.php and www.me.com/page.php?1 and www.me.com/page.php?2 considered 3 unique URIs ?

I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: each resource is accessed through a unique URI

jaytufch
  • 227
  • 3
  • 8

4 Answers4

2

The answer is they are unique URLs, but different URLs could refer to the same entity:

This article might help: http://en.wikipedia.org/wiki/Uniform_Resource_Name

URL's are resource locators, there is nothing to say they must point at different "things", they usually do, but not always.

URN's are meant to be unique identifiers, but again, you could have two URNs pointing to the same book using different ID's

Spacen Jasset
  • 938
  • 2
  • 11
  • 21
  • I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: **each resource is accessed through a unique URI** – jaytufch Jul 12 '11 at 11:58
1

yes. they are interpreted as different urls. you can have for example shop.php?product=1 and shop.php?product=2. Each url shows a different product.

TheBrain
  • 5,528
  • 2
  • 25
  • 26
  • I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: **each resource is accessed through a unique URI** – jaytufch Jul 12 '11 at 11:55
  • Yea, what the TheBrain said. He knows, he is TheBrain after all. But yes, the URL is the entire string. There is some debate about whether ordering of parameters distinguishes URLs or not (really don't think it does, but we're checking). Other than that, URLs is URLs. – Will Hartung Jul 12 '11 at 16:04
0

Yes, they are. The query string is part of the URI.

Guffa
  • 687,336
  • 108
  • 737
  • 1,005
  • I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: **each resource is accessed through a unique URI** – jaytufch Jul 12 '11 at 11:52
0

"Each resource can be addressed via a unique Uniform Resource Identifier (URI)". This line clear said that all those are unique URI. Because for the first URI you are calling default resource. For the later two you are calling resource with specific id.

MAK Ripon
  • 1,065
  • 4
  • 14
  • 27
  • I know they are interpreted as different urls. But are they unique in the sense according to the RESTful definition: **each resource is accessed through a unique URI** – jaytufch Jul 12 '11 at 11:55