Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to RESTful Webservice                    Eftakhairul Islam                           Jr. Software Engineer   ...
What is Webservice?phpXpert Seminar 2011                      2
Webservice Design Models         XML RPC          SOAP          REST     phpXpert Seminar 2011                 3
Inside RESTful Webservice?        Not Techology and not even protocol        Software archetechtural principle        R...
Basic Design Principles Of REST1.  HTTP methods explicitly2.  Be stateless3.  Directory structure­like URIs4. Transfer res...
HTTP Methods Explicitly                             Add ResourcesPOST
HTTP Methods Explicitly                                      Retrieve ResourcesGET
HTTP Methods Explicitly                                    Update ResourcesPUT
HTTP Methods Explicitly                                      Delete ReasourceDELETE
Be StatelessStateful design (Non­REST):                                           previousPage++  Client                  ...
Be Stateless     Stateless design (REST):              GET /resources/?page=2 HTTP/1.1                    <?xml version= ”...
Directory Structure­like URIs{topic_name}
Transfer Resources By Any Valid MIME TypeMostly Used         XML         JSON         XHTMLAny other valid contend type...
Thank You    Please Stop Software Piracy, Save Developer                    Use FOSS or Genuine SoftwarephpXpert Seminar 2...
Upcoming SlideShare
Loading in …5

Introduction to RESTful Webservice


Published on

Published in: Technology, News & Politics
  • Be the first to comment

  • Be the first to like this

Introduction to RESTful Webservice

  1. 1. Introduction to RESTful Webservice Eftakhairul Islam Jr. Software Engineer Right Brain Solution Ltd. email: web:
  2. 2. What is Webservice?phpXpert Seminar 2011  2
  3. 3. Webservice Design Models XML RPC  SOAP  REST  phpXpert Seminar 2011  3
  4. 4. Inside RESTful Webservice? Not Techology and not even protocol Software archetechtural principle Resouces transfer over HTTPphpXpert Seminar 2011  4
  5. 5. Basic Design Principles Of REST1.  HTTP methods explicitly2.  Be stateless3.  Directory structure­like URIs4. Transfer resources by any valid MIME type  supported by the web service.phpXpert Seminar 2011  5
  6. 6. HTTP Methods Explicitly Add ResourcesPOST­Type: application/xml<friend uri=“urn:linkedin:v1:people/888”/> phpXpert Seminar 2011  6
  7. 7. HTTP Methods Explicitly Retrieve ResourcesGET<?xml version="1.0" encoding="UTF­8"?><person>     <id>123</id>     <first­name>Sakib</first­name>     <last­name>Stein</last­name>     <connections total="200">     …</person> phpXpert Seminar 2011  7
  8. 8. HTTP Methods Explicitly Update ResourcesPUT­Type: application/xml<person>    <name>Sakib Mahmud</name>   <best­friend uri=“urn:linkedin:v1:people/999”/>   <photo xsi:nil=“true”/></person> phpXpert Seminar 2011  8
  9. 9. HTTP Methods Explicitly Delete ReasourceDELETE will be deleted from linkedin. phpXpert Seminar 2011  9
  10. 10. Be StatelessStateful design (Non­REST): previousPage++ Client Server nextPage = previousPage return nextPage phpXpert Seminar 2011  10
  11. 11. Be Stateless Stateless design (REST): GET /resources/?page=2 HTTP/1.1 <?xml version= ”1.0” ?> <rsp page=”2” nextPage=”3”> Client <resource id = 11/> Server <resource id = 12”/> . .. </rsp>phpXpert Seminar 2011  11
  12. 12. Directory Structure­like URIs{topic_name} id=eftakhairul phpXpert Seminar 2011  12
  13. 13. Transfer Resources By Any Valid MIME TypeMostly Used XML JSON XHTMLAny other valid contend type phpXpert Seminar 2011  13
  14. 14. Thank You Please Stop Software Piracy, Save Developer Use FOSS or Genuine SoftwarephpXpert Seminar 2011  14