• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Introduction to RESTful Webservice
 

Introduction to RESTful Webservice

on

  • 2,150 views

 

Statistics

Views

Total Views
2,150
Views on SlideShare
1,443
Embed Views
707

Actions

Likes
0
Downloads
27
Comments
0

3 Embeds 707

http://eftakhairul.com 696
http://feeds.feedburner.com 8
http://www.linkedin.com 3

Accessibility

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.

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

    Introduction to RESTful Webservice Introduction to RESTful Webservice Presentation Transcript

    • Introduction to RESTful Webservice Eftakhairul Islam Jr. Software Engineer Right Brain Solution Ltd. email: eftakhairul@gmail.com web: http://eftakhairul.com
    • 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 Resouces transfer over HTTPphpXpert Seminar 2011  4
    • 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
    • HTTP Methods Explicitly Add ResourcesPOST http://api.linkedin.com/v1/people/123/friendsContent­Type: application/xml<friend uri=“urn:linkedin:v1:people/888”/> phpXpert Seminar 2011  6
    • HTTP Methods Explicitly Retrieve ResourcesGET http://api.linkedin.com/v1/people/123Output:<?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
    • HTTP Methods Explicitly Update ResourcesPUT  http://api.linkedin.com/v1/people/123Content­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
    • HTTP Methods Explicitly Delete ReasourceDELETE http://api.linkedin.com/v1/people/123/friends/456Output:Friend:456 will be deleted from linkedin. phpXpert Seminar 2011  9
    • Be StatelessStateful design (Non­REST): previousPage++ Client Server nextPage = previousPage return nextPage phpXpert Seminar 2011  10
    • 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
    • Directory Structure­like URIshttp://example.com/topics/{topic_name}http://graph.facebook.com/10150224661566729http://twitter.com/statuses/user_timeline.xml? id=eftakhairul phpXpert Seminar 2011  12
    • Transfer Resources By Any Valid MIME TypeMostly Used XML JSON XHTMLAny other valid contend type phpXpert Seminar 2011  13
    • Thank You Please Stop Software Piracy, Save Developer Use FOSS or Genuine SoftwarephpXpert Seminar 2011  14