Your SlideShare is downloading. ×
0
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
How the Web Evolves with Hypermedia (IPC11 2011-10-11)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

How the Web Evolves with Hypermedia (IPC11 2011-10-11)

1,453

Published on

Presentation given at International PHP Conference 2011.

Presentation given at International PHP Conference 2011.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,453
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. HOW THE WEB EVOLVES WITH HYPERMEDIA
  • 2. David Zuelke
  • 3. David Zülke
  • 4. http://en.wikipedia.org/wiki/File:München_Panorama.JPG
  • 5. Founder
  • 6. Lead Developer
  • 7. @dzuelke
  • 8. THE WEBThe Internet’s Largest Application
  • 9. WWW
  • 10. first data exchange system
  • 11. planetary scale
  • 12. why is that possible?
  • 13. Hyperlinks!
  • 14. no tight coupling!
  • 15. loosely coupled by design
  • 16. no notification infrastructure
  • 17. HTTP/1.1 404 Not Found
  • 18. embraces failure
  • 19. more information != more friction
  • 20. no limits to scalability
  • 21. WWW is protocol-centric
  • 22. THE HUMAN WEB Point and Click
  • 23. the Web changes
  • 24. 1997
  • 25. 2011
  • 26. but humans can adapt
  • 27. 14+ years of search
  • 28. (and 14+ years of ugly design :p)
  • 29. THE HUMAN BRAIN You are a State Machine!
  • 30. bored
  • 31. want something awesome
  • 32. laaaaaame... what’s on the next pages?
  • 33. PROGRESSIVE INTERNATIONAL GMMC-68✓ Makes something to eat✓ Cool & evil company name ✓ like “Cyberdyne” ✓ or “Umbrella Corporation”✓ GMMC-68 sounds like a Terminator model number
  • 34. GMMC 66 & GMMC 67 89156/ rpy/34402 http://flic.kr/a
  • 35. awesome!
  • 36. let’s buy that
  • 37. let’s model that process
  • 38. AS PSEUDOCODEwhile($david-­‐>isBored()&&!$david-­‐>isBroke()){            case  shopping_cart:  {    squeeze_pacman_stress_ball();                $amazon-­‐>followCheckout();                }  break;    $amazon  =  new  Browser(http://amazon.com);            case  login_or_register:  {    while(!$david-­‐>getIsHappy())  {                if($david-­‐>hasAmazonAccount())  {        switch($amazon-­‐>state)  {                    $amazon-­‐>followLogin();            case  home:  {                }  else  {                $amazon-­‐>search(awesome  stuff);                    $amazon-­‐>followRegister();            }  break;                }            case  search_result_page:  {            }  break;                if(!$amazon-­‐>hasSomethingAwesome())  {            case  order_summary:  {                    $amazon-­‐>followAwesomeProduct();                $amazon-­‐>followConfirmation();                }  elseif($amazon-­‐>hasMorePages())  {            }  break;                    $amazon-­‐>followNextPage();            case  order_confirmation:  {                }  else  {                $david-­‐>setIsHappy(mt_rand(0,1));                    sleep(3600);            }  break;                    $amazon-­‐>state  =  home;  //  retry!            case  default:  {                }                $amazon-­‐>state  =  home;            }  break;            }            case  product_page:  {        }                $amazon-­‐>followAddToCart();    }            }  break; }
  • 39. that was easy
  • 40. interactions driven by human intelligence
  • 41. sometimes idiots drive the interaction
  • 42. THE MACHINE WEB Can Computers Do This?
  • 43. CAN WE TEACH A COMPUTER TO...• ... discover workflows the server offers?• ... follow links to a “next page” until the right product is found?• ... leniently handle... • ... changes in organization of resources? • ... newly added information or operations?
  • 44. yes
  • 45. it’s called REST
  • 46. unfortunately
  • 47. people fuck it up all the time
  • 48. they’re like
  • 49.  I haz REST nao
  • 50. boss is happy
  • 51. VCs give money
  • 52. it’s like the insane cloud hype
  • 53. THE MACHINE BRAIN Hypermedia to the Rescue
  • 54. Hypermedia As The Engine Of Application State
  • 55. it’s the part people always miss
  • 56. I am getting frustrated by the number of people callingany HTTP-based interface a REST API [...]If the engine of application state (and hence the API) isnot being driven by hypertext, then it cannot beRESTful and cannot be a REST API. His Royness Fielding
  • 57. RPC/SOAP
  • 58. out-of-band knowledge drives interaction
  • 59. “you must call init() before execute()”
  • 60. HATEOAS
  • 61. hypermedia type has defined semantics
  • 62. clients follow links with known relations
  • 63. just like humans!
  • 64. <?xml  version="1.0"  encoding="utf-­‐8"  standalone="yes"?><search>    <total_results>9</total_results>    <items_per_page>1</items_per_page>    <start_index>1</start_index>    <link  href="http://openapi.lovefilm.com/catalog/games?start_index=1&amp;items_per_page=1&amp;term=old"                rel="self"  title="self"/>    <link  href="http://openapi.lovefilm.com/catalog/games?start_index=2&amp;items_per_page=1&amp;term=old"                rel="next"  title="next"/>    <link  href="http://openapi.lovefilm.com/catalog/games?start_index=9&amp;items_per_page=1&amp;term=old"                rel="last"  title="last"/>    <catalog_title>        <can_rent>true</can_rent>        <release_date>2003-­‐09-­‐12</release_date>        <title  full="Star  Wars:  Knights  of  the  Old  Republic"  clean="Star  Wars:  Knights  of  the  Old  Republic"/>        <id>http://openapi.lovefilm.com/catalog/title/59643</id>        <adult>false</adult>        <number_of_ratings>574</number_of_ratings>        <rating>4</rating>        <category  scheme="http://openapi.lovefilm.com/categories/catalog"  term="games"/>        <category  scheme="http://openapi.lovefilm.com/categories/format"  term="Xbox"/>        <category  scheme="http://openapi.lovefilm.com/categories/genres"  term="Adventure"/>        <category  scheme="http://openapi.lovefilm.com/categories/genres"  term="Role-­‐playing"/>        <category  scheme="http://openapi.lovefilm.com/categories/certificates/bbfc"  term="TBC"/>        <link  href="http://openapi.lovefilm.com/catalog/title/59643/synopsis"                    rel="http://schemas.lovefilm.com/synopsis"  title="synopsis"/>        <link  href="http://openapi.lovefilm.com/catalog/title/59643/reviews"                    rel="http://schemas.lovefilm.com/reviews"  title="reviews"/>        <link  href="http://www.lovefilm.com/product/59643-­‐Star-­‐Wars-­‐Knights-­‐of-­‐the-­‐Old-­‐Republic.html?cid=LFAPI"                    rel="alternate"  title="web  page"/>    </catalog_title></search>
  • 65. HTTP’s Uniform Interface is generic
  • 66. GET  /products/1234  HTTP/1.1Host:  evil.comAccept:  application/vnd.com.evil.shop+xmlHTTP/1.1  200  OKContent-­‐Type:  application/vnd.com.evil.shop+xml;  charset=utf-­‐8Allow:  GET,  PUT,  DELETE<?xml  version="1.0"  encoding="utf-­‐8"?><product  xmlns="urn:com.evil.prods"  xmlns:atom="http://www.w3.org/2005/Atom">    <id>1234</id>    <name>Shark  with  Friggin’  Laser  Beams  Attached  to  its  Head</name>    <price  currency="EUR">3.14</price>    <atom:link  rel="category"  type="application/vnd.com.evil.shop+xml"                          href="http://evil.com/categories/lasers"/></product>
  • 67. PUT  /products/1234  HTTP/1.1Host:  evil.comContent-­‐Type:  application/vnd.com.evil.shop+xml<?xml  version="1.0"  encoding="utf-­‐8"?><product  xmlns="urn:com.evil.prods"  xmlns:atom="http://www.w3.org/2005/Atom">    <id>1234</id>    <name>Shark  with  Friggin’  Laser  Beams  Attached  to  its  Head</name>    <price  currency="EUR">31414.14</price>    <atom:link  rel="category"  type="application/vnd.com.evil.shop+xml"                          href="http://evil.com/categories/lasers"/></product>HTTP/1.1  204  No  ContentContent-­‐Type:  application/vnd.com.evil.shop+xml;  charset=utf-­‐8Allow:  GET,  PUT,  DELETE
  • 68. EVOLVABILITY(Creationists Better Leave Now)
  • 69. OO style or RPC style
  • 70. clients bound to object graph or procedures
  • 71. SOAP
  • 72. breaks all the clients, all the time
  • 73. expect the unexpected
  • 74. <?xml  version="1.0"  encoding="utf-­‐8"?><products  xmlns="http://acme.com/shop/products">    <product  id="123">        <name>Bacon</name>        <price>5.99</price>    </product></products>
  • 75. <?xml  version="1.0"  encoding="utf-­‐8"?><products  xmlns="http://acme.com/shop/products">    <product  id="123">        <name>Bacon</name>        <price>5.99</price>        OMNOMNOM  Bacon    </product></products>
  • 76. <?xml  version="1.0"  encoding="utf-­‐8"?><products  xmlns="http://acme.com/shop/products">    <product  id="123">        <name>Bacon</name>        <price>5.99</price>        <price  currency="EUR">4.49</price>    </product></products>
  • 77. <?xml  version="1.0"  encoding="utf-­‐8"?><products  xmlns="http://acme.com/shop/products">    <product  id="123">        <name  xml:lang="en">Bacon</name>        <name  xml:lang="de">Speck</name>        <price>5.99</price>    </product></products>
  • 78. <?xml  version="1.0"  encoding="utf-­‐8"?><products  xmlns="http://acme.com/shop/products">    <product  id="123">        <name  xml:lang="en">Bacon</name>        <name  xml:lang="de">Speck</name>        <price>5.99</price>        <link  rel="category"  href="..."  />    </product></products>
  • 79. with this and HATEOAS, clients become unbreakable
  • 80. and the Web evolves with Hypermedia
  • 81. !e End
  • 82. THANK YOU! This was http://joind.in/3871 by @dzuelkeSend me questions or hire us:david.zuelke@bitextender.com

×