Skip to search.
rest-discuss · REST Discussion Mailing List

Group Information

  • Members: 1401
  • Category: Protocols
  • Founded: Nov 13, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

  Messages Help
Advanced
Switching content type   Message List  
Reply Message #5168 of 18829 |
Re: [rest-discuss] Switching content type

On Jul 20, 2005, at 5:18 AM, Nic Ferrier wrote:

>> Resources are concepts. If I have separate concepts of "bank
>> statement in PDF" and "bank statement in HTML", then two separate
>> URIs (one ending in .pdf and one ending in .html) make the most
>> conceptual sense.
>
> I disagree because cool URIs don't change.
>
> If you have separate concepts of "bank statement in PDF" and "bank
> statement in HTML" then I think you're quite unusual. I think of my
> bank statement as my bank statement and I think most people do.

No, there are three resources. One is your generic bank statement.
Second is your bank statement in PDF. Third is your bank statement
in HTML. Three distinct resources calls for three distinct URIs,
even if one of them is just a negotiation point for the rest.

> Resources should not be tied to representations. The reason for this
> is that the resource that identifies my bank statement should always
> be the same. When I'm seventy (if I still have the same bank account
> which is pretty unlikely I have to say) I'd expect my bank statement
> URI to be the same.

That is true for some interactions, but not all. Authoring, for
example, should always be performed on a specific URI that is
dependent on the format, since that allows you to author many
different representations for the more generic URI at the same
time without having to rely on server gymnastics to understand
what resource is being authored.

> Ok. So it comes down to whether you accept that Cool URIs Don't
> Change is part of REST. I can't remember if there's anything in Roy's
> original paper about this. But since this stuff is quite clear in the
> HTTP spec I believe that cool URIs don't change. /8->

Those are orthogonal issues. The fact that you have one URI that
is generic does not in any way limit the number of less generic
URIs that are also used and available within an application.
All URIs are important.

REST is designed so that URI references don't need to change,
which is the principle behind Tim's "cool URIs don't change"
comments. That is the final bit of

This abstract definition of a resource enables key features
of the Web architecture. First, it provides generality by
encompassing many sources of information without artificially
distinguishing them by type or implementation. Second, it
allows late binding of the reference to a representation,
enabling content negotiation to take place based on
characteristics of the request. Finally, it allows an author
to reference the concept rather than some singular
representation of that concept, thus removing the need to
change all existing links whenever the representation
changes (assuming the author used the right identifier).

Using the right identifier requires that identifiers be available
for everything one might want to identify, including each individual
resource that makes up the value set of some "cool URI" resource.

....Roy




Wed Jul 20, 2005 1:17 pm

roy_fielding
Offline Offline
Send Email Send Email

Message #5168 of 18829 |
Expand Messages Author Sort by Date

Is it a great sin if a server implementation does something like this: GET /test/test.html returns Content-Type: text/html GET /test/test.html?type=xml return...
Dimitri Glazkov
dimitriglazkov Offline Send Email
Jul 15, 2005
2:17 pm

Conceptually, the content doesn't stay the same, even if the message body is byte-to-byte identical. So, no problem here that I can see....
Jon Hanna
hack_poet Offline Send Email
Jul 15, 2005
2:38 pm

Which of the implementations "feels" better?...
Dimitri Glazkov
dimitriglazkov Offline Send Email
Jul 15, 2005
2:51 pm

... Neither feel good to me, If a resource is HTML, then you should it's content-type should be HTML. If it's some XML other than XHTML or well-formed HTML...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 15, 2005
3:08 pm

... I probably should've stated more clearly in my original post: the body of response is indeed XHTML. I am trying to work around a very specific issue, which...
Dimitri Glazkov
dimitriglazkov Offline Send Email
Jul 15, 2005
4:06 pm

... HTML is only sometimes XML. If the HTML has one of the W3 DTDs it is likely that it is not XML compliant. Having said that, it is possible to produce...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 15, 2005
3:09 pm

here's some ideas to share.. In the _ideal_ REST world, a good resource identifier, URL should not contain representation-specified information, "Accept"...
Stupid idiot
iamstupidiot Offline Send Email
Jul 17, 2005
4:05 pm

... This is all very good advice. Remember though, that REST is *really* useful for webservices where HTML is not an issue. If you're designing a web...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 17, 2005
6:50 pm

I've noticed these cases are not the correct way to deal with content negotiation after started to read HTTP/1.1 spec in details yesterday. i'm now seeking for...
Stupid idiot
iamstupidiot Offline Send Email
Jul 19, 2005
12:40 am

... Could you post the details of your research here? I am very interested in this topic, as well. ... The browsers don't, but the XMLHttpRequest allows that...
Dimitri Glazkov
dimitriglazkov Offline Send Email
Jul 19, 2005
1:05 am

... i'm doing a study on practical REST implementation in current web application. IMHO, it might be a good start to introduce REST to public, by showing...
toydi
iamstupidiot Offline Send Email
Jul 19, 2005
3:07 am

... In what way were the scenarios you outlined incorrect? ... I'd say Accept is the way to do it... but a browser is primarily an HTML rendering tool. I'm not...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 19, 2005
4:19 am

... I'm still trying to study more details about content negotiation in HTTP/1.1 But as far as i know now, an appropriate way for server to handle Accept tag...
toydi
iamstupidiot Offline Send Email
Jul 19, 2005
9:41 am

... Ah right... I see. Clearly the Accept header applies to any HTTP client. I don't think that makes your examples wrong. ... No. I don't think <a...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 19, 2005
10:49 am

... that's the problem..when RESTie meets The Browser. :P Although REST encourage URL not to be representation-specific (ex. trailing .html, .xml, .atom etc) ...
toydi
iamstupidiot Offline Send Email
Jul 19, 2005
2:44 pm

... I think you're overestimating the role of the browser in REST. REST is a set of strictures for the creation of webservices. It's primary competitor is...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 19, 2005
3:22 pm

... The requirement for extensions is because of the interface with MIME helper apps. They're invoked by the browser with a single command-line parameter, the...
Lucas Gonze
lucas_gonze Offline Send Email
Jul 19, 2005
10:10 pm

what is it about this thread that makes me suspect that it is actually spam? ... From: "toydi" <iamstupidiot@...> To: "Dimitri Glazkov"...
Walden Mathews
waldenmathews Offline Send Email
Jul 20, 2005
12:55 am

... AAAaaarrrggghhh!! Any time your understanding of REST disagrees with your understanding of how the Web works, one or the other is *wrong*. REST is all...
Justin T. Sampson
justin_t_sam... Offline Send Email
Jul 20, 2005
2:38 am

... I'm not sure if you mean this as a personal insult or as a general statement. If it's a personal insult then fine. But if it's a general statement then...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 20, 2005
10:26 am

I'm very tired so I forgot to add the url for cool uris don't change: http://www.w3.org/Provider/Style/URI.html Nic...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 20, 2005
10:56 am

... Hi Nic! I didn't intend it as personal, but I realize it sounded that way and I apologize. It's a general frustration with many recurring discussions by...
Justin T. Sampson
justin_t_sam... Offline Send Email
Jul 20, 2005
11:43 am

... I do agree with you. My point is that human facing webapps (as opposed to machine facing ones which we might call web services) sometimes have to be a...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 20, 2005
12:26 pm

... No, there are three resources. One is your generic bank statement. Second is your bank statement in PDF. Third is your bank statement in HTML. Three...
Roy T. Fielding
roy_fielding Offline Send Email
Jul 20, 2005
1:17 pm

... When you PUT the server could use the content-type to decide what representation is to be edited. I don't understand why you class that as gymnastics. ...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 20, 2005
2:28 pm

... Because I've written HTTP clients and HTTP servers. If the server assumes that every content type is a variant of a single resource instead of a...
Roy T. Fielding
roy_fielding Offline Send Email
Jul 20, 2005
4:03 pm

... Yes. I know. And you wrote the specs. It's certainly difficult arguing with you because of that. But hey! I'm cantankerous! I have written clients and...
Nic Ferrier
nferrier_tap... Offline Send Email
Jul 20, 2005
9:39 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help