Self-descriptive messages

Darrel Miller <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CAKioOqsD5O4BXcZm1yhxgH16Bb7Mre_SmCFOvpmPNCP583bRzQ@mail.gmail.com>
Mark,

The interesting thing about the SKU scenario is that the URI may
actually capture the users intent more accurately than explicitly
stating the quantity.  If the request body contains a URI that points
to http://aonlinestore.com/sku/jumbopackofshrimp then that maybe is
the exactly what that the user is requesting.  The fact that this week
a jumbo pack of shrimp contains 10 shrimp and last week it contained 8
shrimp is irrelevant to the user because the identifier is specifying
what the user wants.

I believe that to discount the my weathersnapshot scenario based on
the fact that I used a text/uri-list is addressing a different point.
I admit that I tend to be somewhat more cavalier about allowing the
server to pile on semantics to a message than I would ever allow a
client to do and I realize that't not a good idea.  However, I believe
the point I was trying to make is just as valid if I were to use
application/vnd.acme.list-of-uris-to-weather-images.

What are negative effects of allowing a server to dereference a link
contained in the request to acquire all the information necessary to
process the request?

Clients do this all the time.  A web browser isn't finished processing
a HTML message until it has dereferenced the stylesheet link to get
all the details about how to render the page prettily.  A web page
that is missing all of its images may completely fail to communicate
its intent to the user .

Darrel

On Fri, Aug 24, 2012 at 8:29 PM, Mark Baker <[email protected]> wrote:
>
>
>
> Hey Darrel. I think I did answer your question, at least by addressing the most subtle point you raised in the sku message. I hope its clear after reading my explanation that your last message was not self descriptive because you used the text/uri-list media type. Also, you'd find that designing a media type to be able to self-descriptively encapsulate everything you need to know about a shopping cart in a single URI, is intractable. It makes for an interesting thought exercise but is practically unworkable.
>
> P.s. never too late to change the subject line :-)
> Mark.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.