Web Services       Web Service API : 80         (Legacy) System
Web Services       Web Service API : 80         (Legacy) System
The Types of Web ServicesBig Web Services  WS-Notification                   REST  WS-Security                   RPC style ...
RESTful Web Services
Representational State Transfer (REST) is a    style of software architecture fordistributed hypermedia systems such as th...
BookingsApplication   HTTP    Routes                     Passengers
Resources                      BookingsApplication   HTTP    Routes                     Passengers
Resources                POST    /booking/{id}/                 GETApplication              /route/{id}/                 P...
Addressable                        Resources                POST    /booking/{id}/                 GETApplication         ...
Uniform    Addressable              Interface    Resources                 POST      /booking/{id}/                  GETAp...
Addressable                                   Resources              GET /booking/123/                                   /...
Addressable                                    Resources              GET /booking/123/                                   ...
Addressable                                             Resources                       GET /booking/123/                 ...
REST = HTTP Used RightREST was “developed” in parallel with the HTTP/1.1protocolCaching and conditional GETProxiesHTTP hea...
Everything Is a Resource    There shall be nothing else
Everything Is a Resource         ROA    There shall be nothing else
Everything Is a Resource•Version 1.0.3 of the software release•The latest version of the software release•Search results f...
Clean and Descriptive URIs
Clean and Descriptive URIs/software/releases/1.0.3.tar.gz/software/releases/latest.tar.gz/search/Galactica/nextprime/1024/...
State(lessness)Application vs. Resource
The Uniform Interface
The Uniform Interface       GET - safe, idempotent       PUT - idempotent       DELETE - idempotent       POST - “complex”
The Uniform Interface      200 - OK      201 - Created      301 - Moved Permanently      400 - Bad Request      404 - Not ...
Connectedness                    passenger          booking  route
Hypermedia as the Engineof Application State                     passenger           booking  route
Problems?TransactionsAsynchronous tasksBatch jobsRelationships betweenresourcesPartial updatesPartial representations
REST                     WS*Embraces HTTP            Ignores HTTPNo bandwidth overhead    Good tool supportSimplicity     ...
Why?
REST overview
REST overview
REST overview
Upcoming SlideShare
Loading in …5
×

REST overview

1,480 views
1,431 views

Published on

REST overview

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,480
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
37
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

REST overview

  1. 1. Web Services Web Service API : 80 (Legacy) System
  2. 2. Web Services Web Service API : 80 (Legacy) System
  3. 3. The Types of Web ServicesBig Web Services WS-Notification REST WS-Security RPC style WSDL REST-RPC hybrid SOAPREST
  4. 4. RESTful Web Services
  5. 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. 6. BookingsApplication HTTP Routes Passengers
  7. 7. Resources BookingsApplication HTTP Routes Passengers
  8. 8. Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  9. 9. Addressable Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  10. 10. Uniform Addressable Interface Resources POST /booking/{id}/ GETApplication /route/{id}/ PUT DELETE /passenger/{id}/
  11. 11. Addressable Resources GET /booking/123/ /booking/{id}/Application /route/{id}/ /passenger/{id}/
  12. 12. Addressable Resources GET /booking/123/ /booking/{id}/Application /route/{id}/ /passenger/{id}/ State and Representation
  13. 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. 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. 15. Everything Is a Resource There shall be nothing else
  16. 16. Everything Is a Resource ROA There shall be nothing else
  17. 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. 18. Clean and Descriptive URIs
  19. 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. 20. State(lessness)Application vs. Resource
  21. 21. The Uniform Interface
  22. 22. The Uniform Interface GET - safe, idempotent PUT - idempotent DELETE - idempotent POST - “complex”
  23. 23. The Uniform Interface 200 - OK 201 - Created 301 - Moved Permanently 400 - Bad Request 404 - Not Found 409 - Conflict 500 - Internal Server Error
  24. 24. Connectedness passenger booking route
  25. 25. Hypermedia as the Engineof Application State passenger booking route
  26. 26. Problems?TransactionsAsynchronous tasksBatch jobsRelationships betweenresourcesPartial updatesPartial representations
  27. 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. 28. Why?

×