Helping Things to REST

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Helping Things to REST - Presentation Transcript

    1. Helping Things to « REST » Web of Things Presentation, part II Dominique Guinard [email_address] Institute for Pervasive Computing, ETH Zurich Lenzerheide, January 2009
    2. Service Oriented Architectures: The WS-* World [ WS Standards, http://www.innoq.com/soa]
    3. Resource Oriented Architectures: The REST World
      • Resources.
      • Their names (URIs).
      • Their representations (JSON, XHTML)
      • Links between them.
      • A uniform interface (HTTP).
      XHTML HTTP URI
    4. Comparing the Two Worlds
      • SOA WS-* Approach
      • HTTP as transporter.
      • The comp-comp interface is a WSDL.
      • User Interface?
      • Testing: stub generation from a WSDL and lots of SOAP messages.
      • SOA loves XML.
      • An App Server everywhere.
      • Heavy.
      • ROA REST Approach
      • HTTP as service platform!
      • The comp-comp interface is the URL.
      • The UI is the URL/browser.
      • Testing by typing a URL in your browser (doable?)
      • ROA loves JSON.
      • A Web Server everywhere .
      • Less heavy.
    5. RESTifying the Spots
    6. 1. Resource Design
      • Root: http://webofthings.net/
      • Resources:
        • Spots: http://webofthings.net/spots
        • Spot 2: http://webofthings.net/spots/2
        • Light Sensor: http://webofthings.net/spots/2/sensors/light
        • Led Actuator: http://webofthings.net/spots/2/actuators/led/
    7. 2. Representation Design
      • XHTML as default, ideal for browsing:
        • http://webofthings.net/spots
      • JSON, ideal for parsing:
        • http://webofthings.net/spots.json
      • XML, ideal for integration
        • http://webofthings.net/spots.xml
    8. 3. Uniform Interface [ HTTP: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol]
    9. 3. Uniform Interface
      • HTTP Verbs: What do you wanna do?
        • GET: retrieve the representation of a resource.
        • PUT: create or update a resource.
        • DELETE: remove a resource.
        • POST: create a subordinate (or custom: RPC!)
      • HTTP Headers: What are you sending me?
        • Metadata:
          • Content type: application/json, text/html, etc.
        • Status:
          • 200 OK, 201 Create, 400 Bad Request, 401 Unauthorized
      • HTTP Body: The meat (or let’s say the carrots):
        • The content in its representation.
    10. Thoughts and Buzz Use your brains! > don’t design-by-buzzword > don’t believe everything you read > always keep in mind that change is inevitable [ Fielding, Roy. “ A little REST and Relaxation” Jazoon 2007] Cache Authenticate Encrypt Link Share Reuse Stateless Lightweight IPv6 Lowpan Mobile Replicate Cloud Scale
      • www.webofthings.net
    SlideShare Zeitgeist 2009

    + Dominique GuinardDominique Guinard Nominate

    custom

    599 views, 0 favs, 1 embeds more stats

    Helping Things to REST

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 599
      • 586 on SlideShare
      • 13 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 6
    Most viewed embeds
    • 13 views on http://www.webofthings.com

    more

    All embeds
    • 13 views on http://www.webofthings.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories