Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Human Made pm & events ❉ WordPress polyglots ❉ WordCamp Europe @petyeah #wcldn

Slide 3

Slide 3 text

large-scale WordPress websites wordpress.com vip partner agency distributed team with ~30 humans @petyeah #wcldn

Slide 4

Slide 4 text

@petyeah #wcldn

Slide 5

Slide 5 text

@petyeah #wcldn

Slide 6

Slide 6 text

feelingrestful.com A DAY OF REST ❉ a week of rest @petyeah #wcldn

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

25% of the web… @petyeah #wcldn

Slide 9

Slide 9 text

from blog platform to application framework @petyeah #wcldn

Slide 10

Slide 10 text

UNDERSTANDING THE REST API @petyeah #wcldn

Slide 11

Slide 11 text

The REST API - the next milestone @petyeah #wcldn

Slide 12

Slide 12 text

2014 State of the Word @petyeah #wcldn

Slide 13

Slide 13 text

Enter the wordpress rest api @petyeah #wcldn

Slide 14

Slide 14 text

why is this important? @petyeah #wcldn

Slide 15

Slide 15 text

@petyeah #wcldn

Slide 16

Slide 16 text

@petyeah #wcldn

Slide 17

Slide 17 text

@petyeah #wcldn delivery speed

Slide 18

Slide 18 text

@petyeah #wcldn

Slide 19

Slide 19 text

@petyeah #wcldn solid backend

Slide 20

Slide 20 text

@petyeah #wcldn security security

Slide 21

Slide 21 text

@petyeah #wcldn modern front end

Slide 22

Slide 22 text

@petyeah #wcldn

Slide 23

Slide 23 text

@petyeah #wcldn backwards compatibility

Slide 24

Slide 24 text

@petyeah #wcldn

Slide 25

Slide 25 text

@petyeah #wcldn

Slide 26

Slide 26 text

wordpress right now @petyeah #wcldn

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

the REST API will help wordpress learn to delegate @petyeah #wcldn

Slide 29

Slide 29 text

the headless cms @petyeah #wcldn

Slide 30

Slide 30 text

@petyeah #wcldn

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

power multiple front ends @petyeah #wcldn

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

one module in a bigger stack @petyeah #wcldn

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

@petyeah #wcldn

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

@petyeah #wcldn

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

@petyeah #wcldn

Slide 42

Slide 42 text

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

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

@petyeah #wcldn

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

opportunities @petyeah #wcldn

Slide 47

Slide 47 text

opportunities Create context-specific solutions @petyeah #wcldn

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

CHALLENGES @petyeah #wcldn

Slide 53

Slide 53 text

Loss of wordpress core functionality CHALLENGES @petyeah #wcldn

Slide 54

Slide 54 text

@petyeah #wcldn

Slide 55

Slide 55 text

Loss of wordpress core functionality Disempowers wordpress site builders CHALLENGES @petyeah #wcldn

Slide 56

Slide 56 text

the curious case of feelingrestful.com @petyeah #wcldn

Slide 57

Slide 57 text

@petyeah #wcldn

Slide 58

Slide 58 text

@petyeah #wcldn

Slide 59

Slide 59 text

@petyeah #wcldn

Slide 60

Slide 60 text

@petyeah #wcldn

Slide 61

Slide 61 text

@petyeah #wcldn

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

petya @petyeah #wcldn

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

Loss of wordpress core functionality Disempowers wordpress site builders CHALLENGES @petyeah #wcldn

Slide 66

Slide 66 text

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

Slide 67

Slide 67 text

@petyeah #wcldn Data needs to be structured in a modular manner, separate to the CSS and HTML

Slide 68

Slide 68 text

@petyeah #wcldn REST API driven sites will not rely on WYSIWYG in TinyMCE for page layouts

Slide 69

Slide 69 text

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

Slide 70

Slide 70 text

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

Slide 71

Slide 71 text

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

Slide 72

Slide 72 text

WordPress as part of a larger stack what will change? @petyeah #wcldn

Slide 73

Slide 73 text

WordPress as part of a larger stack a new (old?) Approach to project management what will change? @petyeah #wcldn

Slide 74

Slide 74 text

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

Slide 75

Slide 75 text

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

Slide 76

Slide 76 text

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

Slide 77

Slide 77 text

@petyeah #wcldn

Slide 78

Slide 78 text

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

Slide 79

Slide 79 text

themes are here to stay. blogs and small sites are not going anywhere wordpress will keep democratising publishing WHAT WILL not CHANGE? @petyeah #wcldn

Slide 80

Slide 80 text

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

Slide 81

Slide 81 text

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

Slide 82

Slide 82 text

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

Slide 83

Slide 83 text

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

Slide 84

Slide 84 text

you might be asking yourselves right about now. some important questions @petyeah #wcldn

Slide 85

Slide 85 text

you might be asking yourselves right about now. is the rest api getting merged? @petyeah #wcldn

Slide 86

Slide 86 text

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

Slide 87

Slide 87 text

you might be asking yourselves right about now. how do you use it if it’s not merged? @petyeah #wcldn

Slide 88

Slide 88 text

and has its own awesome team working on it that has no intention of abandoning it it’s available as a plugin @petyeah #wcldn

Slide 89

Slide 89 text

is it safe to use in production? you might be asking yourselves right about now. @petyeah #wcldn

Slide 90

Slide 90 text

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

Slide 91

Slide 91 text

you might be asking yourselves right about now. will i be able to use the rest api? @petyeah #wcldn

Slide 92

Slide 92 text

sorry. unless you are a developer: no. @petyeah #wcldn

Slide 93

Slide 93 text

you might be asking yourselves right about now. why do i need to know about it then? @petyeah #wcldn

Slide 94

Slide 94 text

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

Slide 95

Slide 95 text

What are endpoints? you might be asking yourselves right about now. @petyeah #wcldn

Slide 96

Slide 96 text

This is a non developer talk but here are some resources you can use to further educate yourself: @petyeah #wcldn

Slide 97

Slide 97 text

@petyeah #wcldn hmn.md/whitepaper

Slide 98

Slide 98 text

@petyeah #wcldn wp-api.org

Slide 99

Slide 99 text

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

Slide 100

Slide 100 text

@petyeah #wcldn follow ryan on twitter @rmccue

Slide 101

Slide 101 text

thank you! @petyeah #wcldn