TAKING THE HYPE OUT OF      HYPERMEDIAryan.lemmer@factor10.com // @ryanlemmer // GMT+2
BUILDING UI
TEMPLATE DRIVEN
TEMPLATE DRIVEN<table>  <tr>    <td> <%= @cart.total %> </td>    ...  </tr></table>
DATA + TEMPLATE DRIVEN
DATA + TEMPLATE DRIVEN{    total: 987,    discount: 10,    ...}
DATA + TEMPLATE DRIVEN                AJAX GET /cart/1{    total: 987,    discount: 10,    ...}
CONSISTENCY
CONSISTENCY
CONSISTENCY
CONSISTENCY
(LACK OF) CONSISTENCY  ... MAKES TESTABILITY TOUGH
TESTABILITYto test, you need a (nice) handle on the situation
TESTABILITYto test, you need a (nice) handle on the situation# capybarait "signs me in" do  within("#session") do    fill_...
INTERACTIONS
INTERACTIONS
INTERACTIONS
INTERACTIONS
IMPLICIT INTERACTIONS
IMPLICIT INTERACTIONS def update_item_qty   @item = @cart.items.find(params[:id])   if @item.update_attributes(:quantity =...
LAY OF THE LAND
LAY OF THE LAND
LAY OF THE LAND
LAY OF THE LAND
HYPERMEDIA DRIVEN
HYPERMEDIA DRIVEN{    data: {            total: 987,            discount: 10,            ...           },    links: {     ...
HYPERMEDIA DRIVEN{                                         after /checkout    data: {            total: 987,            di...
HYPERMEDIA DSL
HYPERMEDIA DSL         GET /cart/12312312
HYPERMEDIA DSL         GET /cart/12312312         POST /cart/12312312
HYPERMEDIA
HYPERMEDIA
HYPERMEDIAonly for “open” carts
HYPERMEDIA+STATEMACHINE
HYPERMEDIA+STATEMACHINE       NEXT STEP ??
HYPERMEDIA+STATEMACHINE                  resource state                  machine       NEXT STEP ??
HYPERMEDIA+STATEMACHINE                      resource state                      machine            only checkout if      ...
EXPLICIT INTERACTIONS
EXPLICIT INTERACTIONS                  SERVER SIDE                 INTERACTION                     LAYER
EXPLICIT INTERACTIONS                  SERVER SIDEHATEOAS          INTERACTION                     LAYER
INTERACTION LAYER
INTERACTION LAYER                HYPERMEDIA                  “FLOW”                “STRUCTURE”
AND CONSISTENCY?
AND CONSISTENCY?   remove   then RELOAD
AND CONSISTENCY?   remove   then RELOAD
ARCHITECTURE
ARCHITECTURE
WHAT’S NEXT?* Smart Hypermedia clients* Hypermedia Types => (HTML Forms, ATOM, ...)* machine-to-machine API’s => dynamic, ...
THANKS  aslam khan andreas brinklennart ohlsson   @factor10
Upcoming SlideShare
Loading in …5
×

Taking the Hype out of Hypermedia

672 views

Published on

Slides for my talk @ RubyFuza 2012

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

  • Be the first to like this

No Downloads
Views
Total views
672
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Taking the Hype out of Hypermedia

  1. 1. TAKING THE HYPE OUT OF HYPERMEDIAryan.lemmer@factor10.com // @ryanlemmer // GMT+2
  2. 2. BUILDING UI
  3. 3. TEMPLATE DRIVEN
  4. 4. TEMPLATE DRIVEN<table> <tr> <td> <%= @cart.total %> </td> ... </tr></table>
  5. 5. DATA + TEMPLATE DRIVEN
  6. 6. DATA + TEMPLATE DRIVEN{ total: 987, discount: 10, ...}
  7. 7. DATA + TEMPLATE DRIVEN AJAX GET /cart/1{ total: 987, discount: 10, ...}
  8. 8. CONSISTENCY
  9. 9. CONSISTENCY
  10. 10. CONSISTENCY
  11. 11. CONSISTENCY
  12. 12. (LACK OF) CONSISTENCY ... MAKES TESTABILITY TOUGH
  13. 13. TESTABILITYto test, you need a (nice) handle on the situation
  14. 14. TESTABILITYto test, you need a (nice) handle on the situation# capybarait "signs me in" do within("#session") do fill_in Login, :with => boo@hoo.com fill_in Password, :with => secrat(sic) end click_link Sign inend
  15. 15. INTERACTIONS
  16. 16. INTERACTIONS
  17. 17. INTERACTIONS
  18. 18. INTERACTIONS
  19. 19. IMPLICIT INTERACTIONS
  20. 20. IMPLICIT INTERACTIONS def update_item_qty @item = @cart.items.find(params[:id]) if @item.update_attributes(:quantity => params[:qty]) redirect_to(@item) else render "edit" end end
  21. 21. LAY OF THE LAND
  22. 22. LAY OF THE LAND
  23. 23. LAY OF THE LAND
  24. 24. LAY OF THE LAND
  25. 25. HYPERMEDIA DRIVEN
  26. 26. HYPERMEDIA DRIVEN{ data: { total: 987, discount: 10, ... }, links: { {rel: “checkout” uri: “...”}}
  27. 27. HYPERMEDIA DRIVEN{ after /checkout data: { total: 987, discount: 10, ... }, { links: { data: { {rel: “checkout” total: 987, uri: “...”} discount: 10,} ... }, links: {} }
  28. 28. HYPERMEDIA DSL
  29. 29. HYPERMEDIA DSL GET /cart/12312312
  30. 30. HYPERMEDIA DSL GET /cart/12312312 POST /cart/12312312
  31. 31. HYPERMEDIA
  32. 32. HYPERMEDIA
  33. 33. HYPERMEDIAonly for “open” carts
  34. 34. HYPERMEDIA+STATEMACHINE
  35. 35. HYPERMEDIA+STATEMACHINE NEXT STEP ??
  36. 36. HYPERMEDIA+STATEMACHINE resource state machine NEXT STEP ??
  37. 37. HYPERMEDIA+STATEMACHINE resource state machine only checkout if cart is “open” NEXT STEP ??
  38. 38. EXPLICIT INTERACTIONS
  39. 39. EXPLICIT INTERACTIONS SERVER SIDE INTERACTION LAYER
  40. 40. EXPLICIT INTERACTIONS SERVER SIDEHATEOAS INTERACTION LAYER
  41. 41. INTERACTION LAYER
  42. 42. INTERACTION LAYER HYPERMEDIA “FLOW” “STRUCTURE”
  43. 43. AND CONSISTENCY?
  44. 44. AND CONSISTENCY? remove then RELOAD
  45. 45. AND CONSISTENCY? remove then RELOAD
  46. 46. ARCHITECTURE
  47. 47. ARCHITECTURE
  48. 48. WHAT’S NEXT?* Smart Hypermedia clients* Hypermedia Types => (HTML Forms, ATOM, ...)* machine-to-machine API’s => dynamic, executable
  49. 49. THANKS aslam khan andreas brinklennart ohlsson @factor10

×