The Future of Data in Ember

The Future of Data in Ember

Presented at EmberConf 2018.

E01ec1de2f7783812d2235a6a9aaaeea?s=128

Dan Gebhardt

March 14, 2018
Tweet

Transcript

  1. the future of data in ember dan gebhardt @dgeb

  2. the future of data in ember is __________________________

  3. the future of data in ember is __________________________ web standards

  4. the future of data in ember is __________________________ ahead of

    web standards
  5. the future of data in ember is __________________________ realtime

  6. RESTful the future of data in ember is __________________________

  7. the future of data in ember is __________________________ graph-based

  8. operations the future of data in ember is __________________________

  9. offline the future of data in ember is __________________________

  10. what you need it to be the future of data

    in ember is __________________________
  11. ember needs to meet you where you are and help

    you get where you want to be
  12. Orbit Fetch + JSON Ember Data ember-apollo-client emberfire ember-redux

  13. None
  14. requirement fetch and display data about some of your favorite

    emberistas
  15. server-side solution GET /api/v1/contacts GET /api/v1/contacts/:contact_id

  16. client-side solution Fetch + JSON

  17. None
  18. None
  19. requirement work offline

  20. None
  21. solution service workers

  22. None
  23. None
  24. $ ember install ember-service-worker $ ember install ember-service-worker-index $ ember

    install ember-service-worker-asset-cache $ ember install ember-service-worker-cache-fallback
  25. None
  26. None
  27. None
  28. None
  29. requirement admin pages to edit emberistas
 (does not need to

    work offline)
  30. server-side solution GET /api/v2/contacts GET /api/v2/contacts/:contact_id POST /api/v2/contacts PATCH /api/v2/contacts/:contact_id

    DELETE /api/v2/contacts/:contact_id
  31. client-side solution Ember Data

  32. None
  33. None
  34. None
  35. requirement everything needs to work offline

  36. server-side solution GET /api/v2/contacts GET /api/v2/contacts/:contact_id POST /api/v2/contacts PATCH /api/v2/contacts/:contact_id

    DELETE /api/v2/contacts/:contact_id
  37. client-side solution Orbit

  38. None
  39. None
  40. Orbit Fetch + JSON Ember Data

  41. how do we allow apps to evolve with the least

    friction?
  42. None
  43. None
  44. Capabilities Complexity

  45. None
  46. None
  47. None
  48. Config

  49. None
  50. None
  51. None
  52. February 2013

  53. February 2013

  54. None
  55. None
  56. ActiveModel Serializers (Rails) Ember Data + RestAdapter

  57. ActiveModel Serializers (Rails) Ember Data + RestAdapter

  58. May 2013 Initial draft May 2015 v1.0

  59. ActiveModel Serializers (Rails) Ember Data + JSONAPIAdapter

  60. JSONAPI Resources (Rails) Ember Data + JSONAPIAdapter

  61. JSONAPI Resources (Rails) Orbit + JSONAPISource

  62. fast_jsonapi (Ruby) Orbit + JSONAPISource

  63. 50+ server libs 14 languages 50+ client libs 14 languages

  64. None
  65. composable, well-defined interfaces Document Structure Protocol Usage +

  66. monolithic full-stack solution back end front end

  67. back end front end single point of connection

  68. back end front end new degree of freedom

  69. back end front end interchangeable components

  70. None
  71. HTTP compliant
 Basic CRUD

  72. compound documents
 hypermedia links filtering sparse fieldsets etc.

  73. v1.1 operations local identities profiles

  74. None
  75. Ember Applications Ember Data

  76. composability + extensibility

  77. store adapter serializer

  78. None
  79. tight coupling store model

  80. store model addons

  81. None
  82. store model addons RecordData interface

  83. new interfaces unlock experimentation

  84. unlocked by RecordData: POJO models schemaless models immutable data structures

    static analysis
  85. None
  86. store
 models basic CRUD

  87. store

  88. partial records embedded records changesets

  89. ???????????????

  90. None
  91. data access and synchronization

  92. universal data layer

  93. None
  94. None
  95. u s e c a s e s

  96. OFFLINE

  97. CLIENT-FIRST DEVELOPMENT

  98. PLUGGABLE SOURCES

  99. DATA SYNCHRONIZATION

  100. EDITING CONTEXTS

  101. UNDO / REDO

  102. OPTIMISTIC UI

  103. b a s i c s

  104. SOURCES

  105. SYNCHRONIZES DATA BETWEEN SOURCES

  106. FLOW CONTROL

  107. s t o re

  108. CHANGE TRACKING

  109. IMMUTABLE DATA

  110. None
  111. single source
 schema

  112. multiple sources
 coordination strategies state buckets

  113. custom sources
 new query ops new update ops

  114. how does orbit fit with ember data?

  115. store
 models basic CRUD

  116. partial records embedded records changesets

  117. ???????????????

  118. offline store forking optimistic UIs undo / redo

  119. offline store forking optimistic UIs undo / redo

  120. Orbit : Ember Data :: Glimmer : Ember

  121. Orbit : Ember Dat :: Glim :

  122. ember data can provide orbit's capabilites in a convention-driven package

  123. orbit and its ecosystem can provide a laboratory for experimentation

  124. "The Future"

  125. GraphQL usage will continue to grow. Apollo will continue to

    innovate.
  126. REST+ solutions, like JSON:API 1.1, will also grow.

  127. The operations primitive will be adopted across the stack.

  128. Static analysis will improve runtime efficiency.

  129. Immutable data structures will see increased internal usage.

  130. Demand for offline PWAs will grow in order to compete

    with native apps.
  131. Orbit will see continued growth across the frontend and in

    Node.
  132. You will be able to incrementally adopt new capabilities in

    your application 
 as you need them.
  133. None
  134. None
  135. None
  136. Config

  137. None
  138. None
  139. None
  140. None
  141. None
  142. let's build great things together!