Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How the Web Works: Lecture 8

How the Web Works: Lecture 8

This talk was designed for a class (98-135) taught at Carnegie Mellon University in Spring 2010.

Abhinav Sharma

January 09, 2014
Tweet

More Decks by Abhinav Sharma

Other Decks in Education

Transcript

  1. XML

  2. XML HTML Generalized Format for structured data XML <=> DOM

    Tree .xml Files XML Parsers out there... JSON : HashTable :: XML : Tree
  3. API

  4. Facebook knows so much about my users. If only... We’ll

    share it, after all, people will think we’re awesome!
  5. Sweet! I code in PHP, Ruby, Python, Java, C, and

    Brainf*ck Ok, we’ll give you a standard format.
  6. REST Representational State Transfer Its not that fancy. Standard for

    Communication Uses HTTP in depth With XML or JSON myhost.com/...
  7. My

  8. RESTful Resource GET POST PUT DELETE api.mytube.com api.mytube.com/ vid_id List

    Members Replace Collection Create New Item Delete Collection Retrieve Data Update Item Member is Collection Delete Item
  9. Facebook Apps Is like a website Inside of Facebook Access

    to Facebook Data friends, networks, about... Users “add” applications Not your domain name
  10. FBML Is an extension of SQL With special <fb:> tags

    Invalid as HTML Facebook reparses Canvas-Callback Model myhost.com/...
  11. JS & FQL Facebook restricts JS Called FBJS FQL is

    SQL-like way to access data on Facebook More general than friends->get() myhost.com/...
  12. YouTube API Data API: Finds the right video Data API

    is REST Based Player API: Customizable Player Player API is Flash Based
  13. Data API Google Data API HTTP Request HTTP + XML

    Response Similar to REST Java, PHP, Python, ObjC, Javascript Libraries http://code.google.com/apis/gdata/
  14. Player API Data API: Finds Video Player : Plays Video

    Flash Player (.swf file) With Parameters player colors, loop video, etc....
  15. Here’s What Matters Everyone has APIs Too many to discuss

    here Usually REST Based PHP libraries common Find the service, read docs