Upload
greg-hines
View
114
Download
3
Tags:
Embed Size (px)
DESCRIPTION
A presentation about RESTful web services and using Drupal as a platform for creating them.
Citation preview
Presented by Greg Hines
E.g. SOAP, XML-RPC
E.g. REST
REST itself isn’t complicated.Defining REST is.
Yet.
• A blog post• A collection of blog posts• An image• A user• Map coordinates• A bank transaction• Search results
Every resource has at least one URI;every URI points to a resource.
http://example.com/blog/2008/05/14/restful-web-services-and-drupal
http://example.com/blog/2008/05
http://example.com/
Response Codes– 200 OK– 404 Not Found– 500 Internal Server Error
There are 39 response codes (plus two not in current use)
• HTTP is stateless by design
• HTTP is stateless by design• Every HTTP request happens in isolation
• HTTP is stateless by design• Every HTTP request happens in isolation• There are two kinds of state in a RESTful web service…
Resources link to each other:
<a href="http://example.com/resource/3">...</a>
Resources link to each other:
<a href="http://example.com/resource/3">...</a>
<link rel="alternate" type="application/atom+xml" href="http://example.com/resource/2.atom" />
Resources link to each other:
<a href="http://example.com/resource/3">...</a>
<link rel="alternate" type="application/atom+xml" href="http://example.com/resource/2.atom" />
<?xml version="1.0" encoding="UTF-8"?><resource xmlns="http://example.com/ns/resource"> <content>...</content> <nextResource href="http://example.com/resource/3"/> <prevResource href="http://example.com/resource/1"/></resource>
(Sort of.)
An appeal to authority or argument by authority is a type of argument in logic consisting on basing the truth value of an assertion on the authority, knowledge, expertise, or position of the person asserting it.
–Wikipedia
• Co-founder, chairman of the Apache Software Foundation• Co-founder of the Apache HTTP Project• On IETF working groups for HTTP, URI, and HTML– Architectural principal on HTTP working group – First name on HTTP spec
• Originator of REST
• User Management
• User Management• Resource Management
• User Management• Resource Management• Routing
• Multiple Representations for Resources
• Multiple Representations for Resources• Content Negotiation