This link has been bookmarked by 196 people . It was first bookmarked on 02 Mar 2006, by techieme Ron.
-
04 Jun 15
-
02 Jan 13
-
26 May 12
Malthus TwainNote: 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
rest web services programming web software development web development
-
04 Feb 12
-
30 Jan 12
-
08 Aug 11
-
What Is REST?
What is REST anyway? It is an architectural style. An architectural style is a named, coordinated set of architectural constraints.
<!-- sidebar begins --> <!-- don't move sidebars--> <!-- sidebar ends -->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. [Roy Fielding]
-
- What are the URIs?
- What's the format?
- What methods are supported at each URI?
- What status codes could be returned?
Let's review. To build a good REST service you need to answer the following questions:
And that's all there is to it. You don't believe me? Good, because it's not true. There's lots more to discuss, like compression, etags, caching, extensibility, idioms, and implementations. See you next month.
-
-
07 Jul 11
-
13 Mar 11
-
06 Feb 11
-
18 Jan 11
-
05 Jan 11
-
02 Jan 11
-
08 Dec 10
-
28 Sep 10
-
19 Sep 10
Matthew Shirey"http://www.intertwingly.net/wiki/pie/PutDeleteSupport"
-
14 Sep 10
-
Question 1: What Are the URIs?
-
Break your problem down into the types of resources you want to manipulate. The thing to remember is that each resource should have its own URI
-
Two places to consider when looking for potential resources are collections and search interfaces. A "collection of resources" may, in itself, be a whole new resource.
-
Question 2: What's the Format?
-
For each of the resources you listed in Step 1, you need to decide what the representations are going to look like. If possible, reuse existing formats if they are applicable. This can increase the chances that your system can be composed with other systems.
-
Question 3: What Methods Are Supported at Each URI?
-
Make sure your GETs are side-effect free.
-
GETs must be both safe and idempotent. In turn, anything which does not have side effects should use GET.
-
At the very least, you'll need to pick a representation for the response of every GET and a representation to place in the request for PUT and POST. Optionally, you may want to consider the representation, if any is returned from a POST.
-
Question 4: What Status Codes Could Be Returned?
-
This will provide good guidance for implementers on the conditions they should be testing for.
-
The issue with using delete and put is that some user agents (notably Safari and some versions of Opera) don't support them from scripting, which means your service becomes inaccessible to users of those agents.
-
You need to provide an alternate mechanism (using POST) of performing delete and put operations. Note: by alternate, I mean implement both, and have the post link invoke delete itself.
-
First of all, a lot web browsers don't support PUT and many web servers block PUT as well, so a lot of people allow POST to do double duty. If you read the HTTP recommendation, it says that PUT is to be used to insert a given file at a given location, so in theory that could be used both for inserting new files and updating old ones. On the other hand POST is used to send a file and query parameters to a given URI, so that is more about modifying or processing that it is about replacing a given file.
-
http://www.intertwingly.net/wiki/pie/PutDeleteSupport
-
Although it is tempting to think of PUT as an update, this is very misleading. It is actually more like an insert. POST is more like an update.
-
PUT is intended to be used for adding new documents. A PUT only becomes an 'update' when the specified document already exists. PUT can effectively be both CREATE and UPDATE.
-
POST is really much more general than either a CRUD CREATE or a PUT
-
The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies
-
the resource that will handle the enclosed entity. That resource might be a data-accepting process, a gateway to some other protocol, or a separate entity that accepts annotations. In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what URI is intended and the server MUST NOT attempt to apply the request to some other resource."
-
-
22 Jun 10
-
17 Apr 10
-
11 Apr 10
-
22 Mar 10
-
03 Mar 10
-
12 Jan 10
-
29 Dec 09
-
14 Dec 09
-
15 Sep 09
-
01 Sep 09
-
15 Aug 09
-
17 Jul 09
-
23 Jun 09
-
27 Apr 09
-
17 Mar 09
-
12 Mar 09
-
19 Feb 09
-
16 Feb 09
-
23 Jan 09
-
15 Jan 09
Darren JensenThe proper terminology here is "representation."
-
08 Jan 09
-
24 Dec 08
-
02 Dec 08
-
03 Nov 08
Martin LindnerEmployees wanted to bookmark certain ECOs or send shortcuts via email, but they couldn't because the URI in the address bar never changed. It was always the same, /cgi-bin/eco.cgi, unchanging, like the blinking 12:00 on an unprogrammed VCR. The employees
-
14 Oct 08
-
11 Oct 08
-
01 Oct 08
-
22 Aug 08
Michael HocterA good basic introductory article with the 4 questions you must answer to create a REST interface
-
29 Jul 08
-
19 Jun 08
-
10 Jun 08
Gabriel GasparoloIn his first installment of XML.com's new column, The Restful Web, Joe Gregorio, one of the people behind Atom, explains how to use REST to create an application protocol in four easy steps.
firefox Bookmarks_Menu Bookmarks_Toolbar Resources Guides rest webservices xml web programming http architecture
-
27 May 08
-
02 May 08
-
24 Apr 08
-
27 Mar 08
-
23 Mar 08
-
21 Mar 08
-
15 Feb 08
-
28 Jan 08
-
11 Jan 08
-
09 Jan 08
-
04 Dec 07
-
17 Nov 07
-
HTTP Method CRUD Action Description POST CREATE Create a new resource GET RETRIEVE Retrieve a representation of a resource PUT UPDATE Update a resource DELETE DELETE Delete a resource -
HTTP Method CRUD Action Description POST CREATE Create a new resource GET RETRIEVE Retrieve a representation of a resource PUT UPDATE Update a resource DELETE DELETE Delete a resource -
HTTP Method CRUD Action Description POST CREATE Create a new resource GET RETRIEVE Retrieve a representation of a resource PUT UPDATE Update a resource DELETE DELETE Delete a resource
-
-
08 Nov 07
-
29 Oct 07
-
24 Oct 07
-
18 Oct 07
-
08 Oct 07
-
04 Sep 07
-
02 Sep 07
-
27 Aug 07
-
10 Aug 07
-
06 Aug 07
-
02 Aug 07
-
02 Jun 07
-
29 May 07
-
24 May 07
-
18 Apr 07
-
13 Mar 07
-
07 Mar 07
-
07 Feb 07
-
24 Jan 07
danIn 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 analy
-
11 Jan 07
-
09 Dec 06
-
27 Nov 06
Matti NarkiaREST is an architectural style that can be used to guide the construction of web services.
REST webservices xml programming web HTTP webdev web_development webservice how-to howto services service imported delicious
-
26 Nov 06
-
06 Nov 06
-
29 Oct 06
-
25 Oct 06
-
12 Sep 06
-
21 Aug 06
-
20 Aug 06
-
18 Jul 06
-
08 Jul 06
-
30 Jun 06
-
01 Jun 06
-
05 May 06
-
07 Apr 06
-
06 Apr 06
auxonne auxonnehe explains how to use the REST architectural style to create an application protocol with web-like properties.
-
20 Mar 06
-
10 Mar 06
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.