Your SlideShare is downloading. ×
0
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Teach a Dog to REST
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Teach a Dog to REST

177,582

Published on

this is an old version. new version here: http://blog.apigee.com/detail/slides_for_restful_api_design_second_edition_webinar/ …

this is an old version. new version here: http://blog.apigee.com/detail/slides_for_restful_api_design_second_edition_webinar/

It's been 10 years since Fielding first defined REST. So, where are all the elegant REST APIs? While many claim REST has arrived, many APIs in the wild exhibit arbitrary, productivity-killing deviations from true REST. We'll start with a typical poorly-designed API and iterate it into a well-behaved RESTful API.

6 Comments
146 Likes
Statistics
Notes
  • happy to announce we just did a 2d edition of this content available here: http://blog.apigee.com/detail/slides_for_restful_api_design_second_edition_webinar/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • crud
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • i updated the slides with additional content on 2/24/2011.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • terse and to the point. thanks for sharing!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • thx
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
177,582
On Slideshare
0
From Embeds
0
Number of Embeds
64
Actions
Shares
0
Downloads
1,111
Comments
6
Likes
146
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. Teach a Dog to RESTBrian Mulloy@landlessnessApigee@apigee
    • 2. Application developers are kingmakers.
    • 3. Make your API easy to learn.
    • 4. Good APIs are a design problem.
    • 5. Idempotent methods
    • 6. I won’t say things like that.
    • 7. Let’s look at puppies.
    • 8. hackett hacketthackett hackett
    • 9. .../getAllDogs/locationVerify/foodNeeded/createRecurringDogWalk/giveDirectOrder/healthCheck/getRecurringDogWalkSchedule/getLocation/getDog/massDogParty/getNewDogsSince/getRedDogs/getSittingDogs/dogStateChangesSearch/replaceSittingDogsWithRunningDogs/saveDog...
    • 10. A puppy’s world is big.
    • 11. JnL law_kevenSmithsonians National Zoo hackett
    • 12. ... .../getAllDogs /getAllLeashedDogs/verifyLocation /verifyVeterinarianLocation/feedNeeded /feedNeededFood/createRecurringWakeUp /createRecurringMedication/giveDirectOrder /doDirectOwnerDiscipline/checkHealth /doExpressCheckupWithVeterinarian/getRecurringWakeUpSchedule /getRecurringFeedingSchedule/getLocation /getHungerLevel/getDog /getSquirrelChasingPuppies/newDog /newDogForOwner/getNewDogsSince /getNewDogsAtKennelSince/getRedDogs /getRedDogsWithoutSiblings/getSittingDogs /getSittingDogsAtPark/setDogStateTo /setLeashedDogStateTo/replaceSittingDogsWithRunningDogs /replaceParkSittingDogsWithRunningDogs/saveDog /saveMommaDogsPuppies... ...
    • 13. We are on a slippery slope.
    • 14. Keep the simple things simple.
    • 15. Hopkinsii
    • 16. We only need two URLs.
    • 17. The first is for a collection.
    • 18. /dogs
    • 19. The second is for an element.
    • 20. /dogs/bo
    • 21. POSTGETPUTDELETE
    • 22. CREATEREADUPDATEDELETE
    • 23. Resource POST GET PUT DELETE create read update delete replace create a delete all /dogs list dogs dogs with new dog dogs new dogs if exists treat as a update Bo collection/dogs/bo show Bo delete Bo create new if not dog in it create Bo Wikipedia
    • 24. Resource POST GET PUT DELETE create read update delete replace create a delete all /dogs list dogs dogs with new dog dogs new dogs treat as a if exists collection update Bo/dogs/bo create show Bo delete Bo new dog if not in it create Bo Wikipedia
    • 25. Resource POST GET PUT DELETE create read update delete bulk create a delete all /dogs list dogs update new dog dogs dogs if exists update Bo/dogs/bo error show Bo delete Bo if not error Wikipedia
    • 26. Verbs are bad.
    • 27. Nouns are good.
    • 28. Plurals are better.
    • 29. What about associations?
    • 30. GET /owners/obama/dogsPOST /owners/obama/dogs
    • 31. What about complex variations?
    • 32. Cody Simms
    • 33. Sweep variations under the ‘?’.
    • 34. /dogs?color=red&state=running&location=park
    • 35. What about pagination?
    • 36. FacebookoffsetlimitTwitterpagerppLinkedInstartcount
    • 37. /dogs?limit=25&offset=50
    • 38. What about versioning?
    • 39. Twilio/2010-04-01/Accounts/salesforce.com/services/data/v20.0/sobjects/AccountFacebook?v=1.0
    • 40. /v1/dogs
    • 41. Please give me exactly what I need.
    • 42. LinkedIn/people:(id,first-name,last-name,industry)Facebook/joe.smith/friends?fields=id,name,pictureGoogle (partial response)?fields=title,media:group(media:thumbnail)
    • 43. /dogs?fields=name,color,location
    • 44. What about formats?
    • 45. Google Data?alt=jsonFoursquare/venue.jsonDiggContent-Type: application/json?type=json
    • 46. /dogs.json/dogs/bo.json
    • 47. What about the rest of the URL?
    • 48. Facebook graph.facebook.com api.facebook.com developers.facebook.comFoursquare api.foursquare.com developers.foursquare.com Twitter api.twitter.com search.twitter.com stream.twitter.com dev.twitter.com
    • 49. API gatewayapi.teachdogrest.comDeveloper connectiondev.teachdogrest.comDo web redirectsapi ! devdevelopers ! devdeveloper ! dev
    • 50. Be RESTfulOnly 2 URLsNo verbsUse nouns as pluralsSweep complexity behind the ‘?’Borrow from leading APIs
    • 51. THANK YOUQuestions and ideas to:Brian Mulloy@landlessnessbrian@apigee.com

    ×