background preloader

HATEOAS

HATEOAS
The HATEOAS constraint decouples client and server in a way that allows the server functionality to evolve independently. Details[edit] A REST client enters a REST application through a simple fixed URL. For example [2] here is a GET request to fetch an Account resource, requesting details in an XML representation: GET /account/12345 HTTP/1.1 Host: somebank.org Accept: application/xml ... Here is the response: HTTP/1.1 200 OK Content-Type: application/xml Content-Length: ... <? Note the response contains 4 possible follow-up links - to make a deposit, a withdrawal, a transfer or to close the account. Some time later the account information is retrieved again, but now the account is overdrawn: HTTP/1.1 200 OK Content-Type: application/xml Content-Length: ... <? Now only one link is available: to deposit more money. A client does not need to understand every media type and communication mechanism offered by the server. Origins[edit] Implementations[edit] See also[edit] Hypertext Application Language

Representational state transfer Representational State Transfer (REST) is a software architecture style consisting of guidelines and best practices for creating scalable web services.[1][2] REST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture.[3] REST has gained widespread acceptance across the Web[citation needed] as a simpler alternative to SOAP and WSDL-based Web services. RESTful systems typically, but not always, communicate over the Hypertext Transfer Protocol with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) used by web browsers to retrieve web pages and send data to remote servers.[3] The REST architectural style was developed by W3C Technical Architecture Group (TAG) in parallel with HTTP 1.1, based on the existing design of HTTP 1.0.[4] The World Wide Web represents the largest implementation of a system conforming to the REST architectural style. Architectural properties[edit]

REST & WOA Wiki - REST & WOA Wiki How to Create a REST Protocol December 01, 2004 Note: In this inaugural article of Joe Gregorio's new column, The Restful Web, he explains how to use the REST architectural style to create an application protocol with web-like properties. Future columns will offer additional REST-based applications and analyses. — Editor If you follow web services, then you may have heard of REST. What Is REST? What is REST anyway? A software architecture is defined by a configuration of architectural elements--components, connectors, and data--constrained in their relationships in order to achieve a desired set of architectural properties. Why Follow REST? The whys of REST are covered on the REST Wiki. Look at it this way: if you're using the infrastructure of the web to move your data around, shouldn't you follow the best practices that will help your data move more smoothly through the system? How to Create a RESTful Interface Now we get to the meat of the matter. What are the URIs? Question 1: What Are the URIs? Employee Format

HTTP/1.1: Status Code Definitions Each Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response. 10.1 Informational 1xx This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. There are no required headers for this class of status code. Since HTTP/1.0 did not define any 1xx status codes, servers MUST NOT send a 1xx response to an HTTP/1.0 client except under experimental conditions. A client MUST be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 (Continue) status message. Proxies MUST forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself requested the generation of the 1xx response. 10.1.1 100 Continue The client SHOULD continue with its request. 10.1.2 101 Switching Protocols 10.2 Successful 2xx - Date

HTTP/1.1: Header Field Definitions This section defines the syntax and semantics of all standard HTTP/1.1 header fields. For entity-header fields, both sender and recipient refer to either the client or the server, depending on who sends and who receives the entity. 14.1 Accept The Accept request-header field can be used to specify certain media types which are acceptable for the response. Accept = "Accept" ":" #( media-range [ accept-params ] ) media-range = ( "*/*" | ( type "/" "*" ) | ( type "/" subtype ) ) *( ";" parameter ) accept-params = ";" "q" "=" qvalue *( accept-extension ) accept-extension = ";" token [ "=" ( token | quoted-string ) ] The asterisk "*" character is used to group media types into ranges, with "*/*" indicating all media types and "type/*" indicating all subtypes of that type. Each media-range MAY be followed by one or more accept-params, beginning with the "q" parameter for indicating a relative quality factor. The example Accept: audio/*; q=0.2, audio/basic A more elaborate example is 1. 2. 3. 4. 1.

Hypermedia Hypermedia, an extension of the term hypertext, is a nonlinear medium of information which includes graphics, audio, video, plain text and hyperlinks. This contrasts with the broader term multimedia, which may include non-interactive linear presentations as well as hypermedia. It is also related to the field of electronic literature. The term was first used in a 1965 article by Ted Nelson.[1] The World Wide Web is a classic example of hypermedia, whereas a non-interactive cinema presentation is an example of standard multimedia due to the absence of hyperlinks. Hypermedia development tools[edit] Hypermedia applications may be developed on embedded devices for the mobile and the digital signage industries using the Scalable Vector Graphics (SVG) specification from W3C (World Wide Web Consortium). Hyperlinks may also be added to data files using most business software via the limited scripting and hyperlinking features built in. Hypermedia and learning[edit] Cultural references[edit]

Remote procedure call In computer science, a remote procedure call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction.[1] That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. When the software in question uses object-oriented principles, RPC is called remote invocation or remote method invocation. Many different (often incompatible) technologies have been used to implement the concept. History and origins[edit] Message passing[edit] An RPC is initiated by the client, which sends a request message to a known remote server to execute a specified procedure with supplied parameters. An important difference between remote procedure calls and local calls is that remote calls can fail because of unpredictable network problems.

A Beginner’s Introduction to HTTP and REST Hypertext Transfer Protocol (HTTP) is the life of the web. It's used every time you transfer a document, or make an AJAX request. But HTTP is surprisingly a relative unknown among some web developers. This introduction will demonstrate how the set of design principles, known as REST, underpin HTTP, and allow you to embrace its fullest power by building interfaces, which can be used from nearly any device or operating system. Republished Tutorial Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. Why REST? REST is a simple way to organize interactions between independent systems. REST is a simple way to organize interactions between independent systems. The alternative is building relatively complex conventions on top of HTTP. After an initial overview, we'll examine each of the HTTP building blocks: URLs, HTTP verbs and response codes. HTTP is the protocol that allows for sending documents back and forth on the web. Spying HTTP at Work

Related: