Fault Tolerant UX

Fault Tolerant UX

Talk from EmberConf 2015.

E01ec1de2f7783812d2235a6a9aaaeea?s=128

Dan Gebhardt

March 04, 2015
Tweet

Transcript

  1. FA U LT T O L E R A N

    T U X D A N G E B H A R D T @ d g e b
  2. None
  3. None
  4. & > < > a > z in r O

    m D > 30 3
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. <html /> J AVA S C R I P T

  18. None
  19. None
  20. None
  21. < M A R K U P / >

  22. None
  23. None
  24. None
  25. None
  26. FA U LT T O L E R A N

    C E U X F I R S T
  27. FA U LT T O L E R A N

    T U X = = T R A N S A C T I O N A L U X
  28. T R A N S A C T I O

    N A L U X • Atomic • Consistent • Isolated • Durable
  29. AT O M I C “ A L L O

    R N O T H I N G ”
  30. None
  31. C O N S I S T E N T

    M O V E S B E T W E E N VA L I D S TAT E S
  32. None
  33. None
  34. I S O L AT E D A L L

    O W S C O N C U R R E N T C H A N G E S
  35. None
  36. D U R A B L E C H A

    N G E S P E R S I S T
  37. None
  38. A p p l i c a t i o

    n s M U S T N O T V i o l a t e t h e R u l e s o f Tr a n s a c t i o n a l U X O R E L S E
  39. FA U LT T O L E R A N

    T U X = = F O R G I V I N G U X
  40. A p p l i c a t i o

    n s S H O U L D Tr y t o P ro v i d e a F o rg i v i n g U X ~ p l e a s e ~
  41. T R A N S I T I O N

    A L P E R S I S T E N C E
  42. None
  43. U N D O / R E D O

  44. None
  45. O F F L I N E S U P

    P O RT
  46. [ Offline ] Ember ToDos

  47. A S Y N C H R O N O

    U S ( N O N - B L O C K I N G ) I N T E R FA C E
  48. Syncing… Ember ToDos

  49. E N G I N E E R I N

    G FA U LT T O L E R A N C E
  50. E M B E R P R O V I

    D E S S I M P L E , E L E G A N T PAT T E R N S F O R B U I L D I N G A C O N S I S T E N T U X
  51. E M B E R D ATA P R O

    V I D E S S I M P L E , E L E G A N T PAT T E R N S F O R B U I L D I N G A C O N S I S T E N T + D U R A B L E U X
  52. E M B E R D ATA Atomic Consistent Isolated

    Durable = R E Q U I R E S C U S T O M I Z AT I O N Transitional Persistence Undo / Redo Offline Support Asynchronous Interfaces
  53. R E T H I N K A S S

    U M P T I O N S A N D P R I M I T I V E S
  54. DISPARATE SOURCES

  55. DISPARATE DATA

  56. COMMON INTERFACES

  57. NORMALIZED DATA

  58. EVENTED CONNECTIONS

  59. PROMISIFIED METHODS doThing

  60. A S TA N D A L O N E

    L I B R A RY F O R C O O R D I N AT I N G A C C E S S T O D ATA S O U R C E S A N D K E E P I N G T H E I R C O N T E N T S S Y N C H R O N I Z E D .
  61. PRIMARY INTERFACES { } REQUESTABLE TRANSFORMABLE

  62. REQUESTABLE find add remove update patch findLink addLink removeLink findLinked

  63. TRANSFORMABLE transform(operation)

  64. NORMALIZED DATA JSON Patch transformations: [{"op":"remove",! "path":["planet","f82eed41-3e63-4061-953f-23f74192dcdd"]}! {"op":"add",! "path":["planet","107dc357-7df5-422f-b9d7-817244716e86"],! “value”:{“name”:”Mercury",!

    "id":"107dc357-7df5-422f-b9d7-817244716e86"}}]!
  65. CONNECTORS { } REQUEST TRANSFORM

  66. SYNCHRONOUS EVENT HANDLING 1 2 3 4 5 6

  67. 1 2 3 4 5 6 7 ??? P P

    = Promise SYNCHRONOUS EVENT HANDLING
  68. PROMISE-AWARE EVENTS 1 2 3 4 5 6 7 8

    P P P P P = Promise Async Blocking
  69. PROMISE-AWARE EVENTS 1 2 3 ??? 4 5 6 7

    P = Promise P P Async Non-Blocking
  70. COMMON LIBRARY

  71. { } MEMORY JSON API LOCAL STORAGE + MORE +

    ORBIT COMMON LIB 
 SOURCES
  72. { } MODELS KEYS RELATIONSHIPS + MORE + ORBIT COMMON

    LIB 
 SCHEMA
  73. + = ember-orbit

  74. EO.Store all filter retrieve ! find add remove patch findLink

    addLink removeLink { } { } Synchronous Asynchronous ember-orbit
  75. Star = EO.Model.extend({! name: attr('string'),! planets: hasMany('planet', {inverse: 'sun'})! });!

    ! Planet = EO.Model.extend({! name: attr('string'),! classification: attr('string'),! sun: hasOne('star', {inverse: 'planets'})! }); EO.Model ember-orbit
  76. URLS DRIVE APPLICATION STATE

  77. SOURCES DRIVE MODEL STATE ember-orbit

  78. A P P L I C AT I O N

    PAT T E R N S
  79. CLIENT-FIRST DEVELOPMENT

  80. PLUGGABLE SOURCES

  81. DATA SYNCHRONIZATION

  82. EDITING CONTEXTS

  83. UNDO / REDO

  84. Twitter: @orbitjs
 IRC: #orbitjs
 Github: https://github.com/orbitjs Soon: orbitjs.com

  85. T H A N K S ! @ d g

    e b