[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
Representational State Transfer (REST) is defined as an architectural style, which means that it is not a concrete systems architecture, but instead a set of constraints that are applied when designing a systems architecture. We briefly discuss these constraints, but then focus on explaining how the Web is one such systems architecture that implements REST. In particular, the mechanisms of the Uniform Resource Identifiers (URIs), the Hypertext Transfer Protocol (HTTP), media types, and markup languages such as the Hypertext Markup Language (HTML) and the Extensible Markup Language (XML). We also introduce Atom and the Atom Publishing Protocol (AtomPub) as two established ways on how RESTful services are already provided and used on today's Web.
|
serviceas
a mechanism to enable access to one or more capabilities, where the access is provided using a prescribed interface and is exercised consistent with constraints and policies as specified by the service description.
Thingin this case should refer to anything
Stateless Applications!
different RESTful Webuses Web Distributed Authoring and Versioning (WebDAV)
10 browsers
10 browser tabs
client scope)
stuff
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
[…] the URI syntax is a federated and extensible naming system wherein each scheme's specification may further restrict the syntax and semantics of identifiers using that scheme.
Uniform Resource Identifier (URI): Generic Syntax
, RFC 3986, January 2005 [http://dret.net/rfc-index/reference/RFC3986]
inputto the resource
The query component contains non-hierarchical data that, along with data in the path component […], serves to identify a resource within the scope of the URI's scheme and naming authority […].
Uniform Resource Identifier (URI): Generic Syntax
, RFC 3986, January 2005 [http://dret.net/rfc-index/reference/RFC3986]
41 × 1 × 1 × 1 × 1 …
without side-effectsmeans
without relevant side-effects
41 × 0 × 0 × 0 × 0 …
without side-effectsmeans
without relevant side-effects
URI/cookiecombo)
bestrepresentation
XMLHttpRequest
API has been built for requesting XML via HTTPXMLHttpRequest
has to be parsed into a DOM tree<?xml version="1.0"?> <menu id="file" value="File"> <popup> <menuitem value="New" onclick="CreateNewDoc()"/> <menuitem value="Open" onclick="OpenDoc()"/> <menuitem value="Close" onclick="CloseDoc()"/> </popup> </menu>
{ "menu" : { "id" : "file", "value" : "File", "popup" : { "menuitem" : [ { "value" : "New", "onclick" : "CreateNewDoc()" }, { "value" : "Open", "onclick" : "OpenDoc()" }, { "value" : "Close", "onclick" : "CloseDoc()" } ] } }}
URI hackingon the Web works and can be useful
shared statewithin the context of one browser
session scenarioscan be mapped to resources [http://www.peej.co.uk/articles/no-sessions.html]
sessionto
resource