restful rabbits
DESCRIPTION
A BarCamp Brighton presentation by Gareth Rushgrove on RESTful architectures and the NabaztagTRANSCRIPT
RESTful Rabbits
The Northtm
REST
Representational State Transfer (REST) is a style of software architecture for distributed hypermedia
systems such as the World Wide Web
http://roy.gbiv.com/pubs/dissertation/top.htm
HTTP Verbs
GET, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, HEAD
http://tools.ietf.org/html/rfc2616
Resource Orientated Design
Nouns and Verbs
Nouns are resources you act upon
Verbs are what you do to those resources
Generally this means GET, POST, PUT and DELETE
No matter what web server you have, and no matter what web client I have, I know if I see a URL of your,
that I can retrieve the associated document using HTTP GET, with no advance co-ordination needed
other than agreement on the relevant specs
Cool Stuff
http://rest.blueoxen.net/cgi-bin/wiki.pl?AnotherRestDescription
Flickr Bashing
Flickr API
GET /photos/garethrGET /people/garethr/contactsPUT /photos/garethrPUT /people/garethr/contacts/PUT /peopleGET /photos/garethr/tags
Flickr RESTful API?
201 Created
2xx Success
3xx Redirection
400 Bad Request401 Unathorized403 Forbidden404 Not Found410 Gone412 Precondition Failed
4xx Client Error
5xx Server Error
501 Not Implemented503 Service Temporarily Unavailable
Rabbits?
Rabbits!
posright Position of the right ear between 0 and 16 posleft Position of the left ear between 0 and 16 ears=ok Send the position of the ears
http://api.nabaztag.com/vl/FR/api.jsp
Nabaztag API
GET /ears/leftGET /ears/rightPUT /ears/leftPUT /ears/rightPOST /mouthGET /name
Nabaztag RESTful API
A Rabbit called Cambridge
Microformats and REST sitting in a tree
Microformats for Write APIs
+
Read Books
http://flickr.com/photos/lkfdesign/365335459/http://flickr.com/photos/sjaek/275710273/
http://flickr.com/photos/lost-moments/444960411/http://flickr.com/photos/listercat/1347862097/http://flickr.com/photos/misspepo/1338884925/
http://www.sourcebottle.net/
Thanks To...
Any Questions?