We need to talk about the REST API

We need to talk about the REST API

A non-developer guide to the opportunities, challenges and changes for WordPress coming with the REST API.

10 April 2016, WordCamp London.

B5223ebc4690c47d881722e5adb3a177?s=128

Petya Raykovska

April 10, 2016
Tweet

Transcript

  1. WE NEED TO TALK ABOUT The rest api @petyeah #wcldn

  2. Human Made pm & events ❉ WordPress polyglots ❉ WordCamp

    Europe @petyeah #wcldn
  3. large-scale WordPress websites wordpress.com vip partner agency distributed team with

    ~30 humans @petyeah #wcldn
  4. @petyeah #wcldn

  5. @petyeah #wcldn

  6. feelingrestful.com A DAY OF REST ❉ a week of rest

    @petyeah #wcldn
  7. @petyeah #wcldn driven ❉ control freak ❉ has trouble delegating

  8. 25% of the web… @petyeah #wcldn

  9. from blog platform to application framework @petyeah #wcldn

  10. UNDERSTANDING THE REST API @petyeah #wcldn

  11. The REST API - the next milestone @petyeah #wcldn

  12. 2014 State of the Word @petyeah #wcldn

  13. Enter the wordpress rest api @petyeah #wcldn

  14. why is this important? @petyeah #wcldn

  15. @petyeah #wcldn

  16. @petyeah #wcldn

  17. @petyeah #wcldn delivery speed

  18. @petyeah #wcldn

  19. @petyeah #wcldn solid backend

  20. @petyeah #wcldn security security

  21. @petyeah #wcldn modern front end

  22. @petyeah #wcldn

  23. @petyeah #wcldn backwards compatibility

  24. @petyeah #wcldn

  25. @petyeah #wcldn

  26. wordpress right now @petyeah #wcldn

  27. how will the REST API role change this? @petyeah #wcldn

  28. the REST API will help wordpress learn to delegate @petyeah

    #wcldn
  29. the headless cms @petyeah #wcldn

  30. @petyeah #wcldn

  31. 31 @petyeah #wcldn Source: https://hmn.md/wordpress-rest-api-white-paper/

  32. power multiple front ends @petyeah #wcldn

  33. @petyeah #wcldn Source: https://hmn.md/wordpress-rest-api-white-paper/

  34. one module in a bigger stack @petyeah #wcldn

  35. @petyeah #wcldn Source: https://hmn.md/wordpress-rest-api-white-paper/

  36. That's all great, examples? @petyeah #wcldn

  37. @petyeah #wcldn

  38. A react native iOS app that reuses code from the

    browser app is used for create overlays on the map. uses APIs to gather geodata from Facebook, Swarm, Twitter, Instagram, and Tripit Wordpress provided stable central platform where data can be aggregated and delivered to the frontend nomad base Content platform & API LEAFLET React iOS app @petyeah #wcldn
  39. @petyeah #wcldn

  40. Node.js server enables server-side rendering React was used because it

    allows for isomorphic rendering wordpress at the backend + react fronted us two website react frontend single page app Node.JS @petyeah #wcldn
  41. @petyeah #wcldn

  42. A bunch of complicated technologies are used to render data

    to handle processes that happen on save the fronted is served by wordpress for seo reasons but data is received from web socket and rendered via react The Admin interface is a backbone app that uses the WordPress REST API. Constantly updated filterable stream ny Times live coverage platform wp frontend for seo Backbone + REST custom endpoints data rendered via react @petyeah #wcldn
  43. React updates the content react Updates are added on the

    backend or via SLACK ;) React wraps the posts area Request is served by WordPress, PHP generates markup JavaScript listens to Web Socket nytimes.com/live/{event} wp + php react Javascript wordpress @petyeah #wcldn Source: http://www.slideshare.net/ScottTaylor1/rest-in-action-the-live-coverage-platform-at-the-new-york-times
  44. @petyeah #wcldn

  45. Custom WordPress rest api endpoint makes the content available to

    the fronted text and images are rapidly posted via a third party mobile platform, polled and saved to WordPress post meta the data is displayed via a custom React.js front end where the user can easily and quickly read though the content or site back and watch new posts pop into view Data is delivered from wordpress WIRED live blog REact frontend wordpress data third party mobile platform Custom REST API End points @petyeah #wcldn
  46. opportunities @petyeah #wcldn

  47. opportunities Create context-specific solutions @petyeah #wcldn

  48. opportunities Create context-specific solutions Reusable, portable content @petyeah #wcldn

  49. opportunities Create context-specific solutions Reusable, portable content Separation of concerns

    @petyeah #wcldn
  50. opportunities Create context-specific solutions Reusable, portable content Separation of concerns

    Familiar backend for authors and publishers @petyeah #wcldn
  51. opportunities Create context-specific solutions Reusable, portable content Separation of concerns

    Integrate WordPress as one part of a content-authoring workflow Familiar backend for authors and publishers @petyeah #wcldn
  52. CHALLENGES @petyeah #wcldn

  53. Loss of wordpress core functionality CHALLENGES @petyeah #wcldn

  54. @petyeah #wcldn

  55. Loss of wordpress core functionality Disempowers wordpress site builders CHALLENGES

    @petyeah #wcldn
  56. the curious case of feelingrestful.com @petyeah #wcldn

  57. @petyeah #wcldn

  58. @petyeah #wcldn

  59. @petyeah #wcldn

  60. @petyeah #wcldn

  61. @petyeah #wcldn

  62. a few setbacks couldn’t edit menus couldn’t use previews couldn’t

    impact the front end in any way each small change on the website apart from the content needed a developer @petyeah #wcldn
  63. petya @petyeah #wcldn

  64. siobhan F*$&#^G REST API!!! @petyeah #wcldn

  65. Loss of wordpress core functionality Disempowers wordpress site builders CHALLENGES

    @petyeah #wcldn
  66. Loss of wordpress core functionality Disempowers wordpress site builders The

    necessity for structured, portable data CHALLENGES @petyeah #wcldn
  67. @petyeah #wcldn Data needs to be structured in a modular

    manner, separate to the CSS and HTML
  68. @petyeah #wcldn REST API driven sites will not rely on

    WYSIWYG in TinyMCE for page layouts
  69. Loss of wordpress core functionality Disempowers wordpress site builders The

    necessity for structured, portable data Progressive enhancement CHALLENGES @petyeah #wcldn
  70. Loss of wordpress core functionality Disempowers wordpress site builders The

    necessity for structured, portable data Progressive enhancement CHALLENGES knowledge deficits @petyeah #wcldn
  71. With the REST API, WordPress stops being a web development

    tool used in isolation. WordPress becomes just one module that is available in a web developer’s toolkit WHAT WILL CHANGE? @petyeah #wcldn
  72. WordPress as part of a larger stack what will change?

    @petyeah #wcldn
  73. WordPress as part of a larger stack a new (old?)

    Approach to project management what will change? @petyeah #wcldn
  74. WordPress as part of a larger stack what will change?

    WordPress developer will become backend specialists a new (old?) Approach to project management @petyeah #wcldn
  75. WordPress as part of a larger stack what will change?

    WordPress will be adopted outside of PHP communities WordPress developer will become backend specialists a new (old?) Approach to project management @petyeah #wcldn
  76. WordPress as part of a larger stack WordPress developer will

    become backend specialists WordPress will be adopted outside of PHP communities what will change? The emergence of funnelled, role-based admin interfaces a new (old?) Approach to project management @petyeah #wcldn
  77. @petyeah #wcldn

  78. WordPress as part of a larger stack The WordPress developer

    as a backend specialist what will change? The emergence of funnelled, role-based admins The enhancement of built-in WordPress functionality a new (old?) Approach to project management WordPress will be adopted outside of PHP communities @petyeah #wcldn
  79. themes are here to stay. blogs and small sites are

    not going anywhere wordpress will keep democratising publishing WHAT WILL not CHANGE? @petyeah #wcldn
  80. themes and theme shops will continue to function as before

    what will not change? @petyeah #wcldn
  81. themes and theme shops will continue to function as before

    wordpress will still be used for blogging, small sites and DYI sites what will not change? @petyeah #wcldn
  82. themes and theme shops will continue to function as before

    wordpress will still be used for blogging, small sites and DYI sites backwards compatibility will not suffer what will not change? @petyeah #wcldn
  83. themes and theme shops will continue to function as before

    wordpress will still be used for blogging, small sites and DYI sites backwards compatibility will not suffer what will not change? wordpress’ mission will remain the same: to democratise publishing @petyeah #wcldn
  84. you might be asking yourselves right about now. some important

    questions @petyeah #wcldn
  85. you might be asking yourselves right about now. is the

    rest api getting merged? @petyeah #wcldn
  86. and there is a bit of a glitch around how

    feedback is given to the team from the leadership it is. but it still needs work @petyeah #wcldn
  87. you might be asking yourselves right about now. how do

    you use it if it’s not merged? @petyeah #wcldn
  88. and has its own awesome team working on it that

    has no intention of abandoning it it’s available as a plugin @petyeah #wcldn
  89. is it safe to use in production? you might be

    asking yourselves right about now. @petyeah #wcldn
  90. the development teams at ny times and wided use it.

    how much more proof do you need? yes. we saw that a few slides back @petyeah #wcldn
  91. you might be asking yourselves right about now. will i

    be able to use the rest api? @petyeah #wcldn
  92. sorry. unless you are a developer: no. @petyeah #wcldn

  93. you might be asking yourselves right about now. why do

    i need to know about it then? @petyeah #wcldn
  94. it’s important you understand it when you write proposals or

    read rfps . if you ever want to do kick ass wordpress work it’s the future of wordpress @petyeah #wcldn
  95. What are endpoints? you might be asking yourselves right about

    now. @petyeah #wcldn
  96. This is a non developer talk but here are some

    resources you can use to further educate yourself: @petyeah #wcldn
  97. @petyeah #wcldn hmn.md/whitepaper

  98. @petyeah #wcldn wp-api.org

  99. @petyeah #wcldn hmn.md/wp-api/core/

  100. @petyeah #wcldn follow ryan on twitter @rmccue

  101. thank you! @petyeah #wcldn