[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

REST and the Web - was Re: Re: Cookies at XML Europe 2004 -- C


rest cookies
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.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.