REST overview
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


REST overview



REST overview

REST overview



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

REST overview Presentation Transcript

  • 1. Web Services Web Service API : 80 (Legacy) System
  • 2. Web Services Web Service API : 80 (Legacy) System
  • 3. The Types of Web ServicesBig Web Services WS-Notification REST WS-Security RPC style WSDL REST-RPC hybrid SOAPREST
  • 4. RESTful Web Services
  • 5. Representational State Transfer (REST) is a style of software architecture fordistributed hypermedia systems such as theWorld Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1.
  • 6. BookingsApplication HTTP Routes Passengers
  • 7. Resources BookingsApplication HTTP Routes Passengers
  • 8. Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  • 9. Addressable Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  • 10. Uniform Addressable Interface Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  • 11. Addressable Resources GET /booking/123/ /booking/{id}/Application /route/{id}/ /passenger/{id}/
  • 12. Addressable Resources GET /booking/123/ /booking/{id}/Application /route/{id}/ /passenger/{id}/ State and Representation
  • 13. Addressable Resources GET /booking/123/ /booking/{id}/Application /route/{id}/ 200 OK /passenger/{id}/ id: 123, pickupTime: ‘2010-12-13T09:00:00’, passenger: { State and link: { href: ‘/passenger/234’, Representation rel: ‘related’ } }
  • 14. REST = HTTP Used RightREST was “developed” in parallel with the HTTP/1.1protocolCaching and conditional GETProxiesHTTP headers (e.g.content negotiation)HTTP methods
  • 15. Everything Is a Resource There shall be nothing else
  • 16. Everything Is a Resource ROA There shall be nothing else
  • 17. Everything Is a Resource•Version 1.0.3 of the software release•The latest version of the software release•Search results for the word ‘Galactica’•The next prime number after 1024•The relationship between Alice and Bob•A list of open bugs in the bug database There shall be nothing else
  • 18. Clean and Descriptive URIs
  • 19. Clean and Descriptive URIs/software/releases/1.0.3.tar.gz/software/releases/latest.tar.gz/search/Galactica/nextprime/1024/relationships/Alice;Bob/bugs/by-state/open
  • 20. State(lessness)Application vs. Resource
  • 21. The Uniform Interface
  • 22. The Uniform Interface GET - safe, idempotent PUT - idempotent DELETE - idempotent POST - “complex”
  • 23. The Uniform Interface 200 - OK 201 - Created 301 - Moved Permanently 400 - Bad Request 404 - Not Found 409 - Conflict 500 - Internal Server Error
  • 24. Connectedness passenger booking route
  • 25. Hypermedia as the Engineof Application State passenger booking route
  • 26. Problems?TransactionsAsynchronous tasksBatch jobsRelationships betweenresourcesPartial updatesPartial representations
  • 27. REST WS*Embraces HTTP Ignores HTTPNo bandwidth overhead Good tool supportSimplicity WSDLWeb already is RESTful “Standards”HTTPS / HTTP Diges, Plethora of SecurityOAuth Standards
  • 28. Why?