OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   REST and the Web - was Re: [xml-dev] Re: Cookies at XML Europe 2004 -- C

[ Lists Home | Date Index | Thread Index ]

Somebody just shoot me, I'm getting into another email debate about 
REST :-)  That's one New Years Resolution down the drain....

> The real problem is that cookies are completely contrary to the web 
> architecture. They create resources that do not have URIs, and thus 
> cannot be bookmarked, linked to, and otherwise referenced. They 
> attempt to force state into a fundamentally stateless protocol with 
> disastrous results. Even if there were no privacy implications, 
> cookies would still be the wrong solution... But there is no reason I 
> should simultaneously give up the ability to bookmark or link to a 
> page as a result of providing my name.
>

How can something as widely used as cookies be "contrary to the Web 
architecture?"

One can say that they're contrary to the *theoretical* principles of 
REST, but then the Web As It Is would be largely non-RESTful, eh? The 
string "cookie" does not appear in the TAG Webarch document, so I don't 
think they have weighed in on the subject.

One might argue that that Web would be better if it were more RESTful, 
but that is an unproved assertion and not a logical deduction or 
empirical generalization.  One can of course argue on pragmatic grounds 
that a specific site would be more useable if the results of a URI 
dereference were always the same independently of the state maintained 
on the client (e.g. a cookie), but compelling use cases might be hard 
to find in a world where there tends to be 1 person for 1 computer (or 
account on a computer).

For example, everyone who subscribes to Bloglines gets a different HTML 
page when dereferencing http://www.bloglines.com/myblogs ; a cookie 
somehow identifies *my* subscription list.  (The state is maintained on 
the server, so my various computers see the same state of the same 
list). Is that a problem? I prefer it to having to dereference 
http://www.bloglines.com/mchampion666 or whatever [I have a daughter 
whose name begins with "M" and we are already competing for the 
"mchampion" namespace!].  Contrary to the Web architecture?  Arguably 
it's just the "representation" of the resource *my* blogs that changes 
with the definition of "me", just as (in the canonical example) the 
representation of the weather page in Oaxaca changes with the weather.

I'm happy to argue that typical Web *services* should be more Web-like 
(support GET, use hyperlinks, etc.), but I'm not so comfortable arguing 
that typical Web *sites* should be come more RESTful, at least until 
there is empirical evidence that RESTful web sites are in some tangible 
sense better than non-RESTful sites.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS