Slide 1

Slide 1 text

Drupal Unhitched The CMS in Decoupled Architectures Decoupled Drupal Days 2018

Slide 2

Slide 2 text

Hi. Mark Llobrera Technology Director, Bluecadet Philadelphia @dirtystylus @bluecadet

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Descriptive, Not Prescriptive I’m not telling you how to do this stuff. But I hope all of this helps.

Slide 7

Slide 7 text

3 Things

Slide 8

Slide 8 text

3 Things 1. What is a decoupled CMS?

Slide 9

Slide 9 text

3 Things 1. What is a decoupled CMS? 2. Decoupled Scenarios

Slide 10

Slide 10 text

3 Things 1. What is a decoupled CMS? 2. Decoupled Scenarios 3. Decoupling Drupal

Slide 11

Slide 11 text

1. What is a Decoupled CMS?

Slide 12

Slide 12 text

What is a decoupled CMS?

Slide 13

Slide 13 text

What is a decoupled CMS? •An architecture for websites and applications where the CMS is not used to render the user-facing site or application.

Slide 14

Slide 14 text

Stop me if you’ve heard this one before

Slide 15

Slide 15 text

Separating CONTENT from PRESENTATION

Slide 16

Slide 16 text

2. Decoupled Scenarios

Slide 17

Slide 17 text

First, a flashback…

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Touchscreen Interactive + Static XML Penn Museum, Native American Voices

Slide 20

Slide 20 text

“Authoring XML for 300+ objects by hand is…unwise.”

Slide 21

Slide 21 text

“Authoring XML for 300+ objects by hand is…unwise.” — Me, after lots of pain

Slide 22

Slide 22 text

CMS (Drupal 8) + Touchscreen Interactive (React) + JS Website (React) Smithsonian National Museum of the American Indian nmai.si.edu/americans

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

CMS (Drupal 8) + CMS-rendered Website + Digital Signage (React) Mann Center for the Performing Arts manncenter.org

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

CMS + CMS-rendered Website + React components BRIC bricartsmedia.org

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

CMS + Statically Published React (GatsbyJS) Outrider Foundation outrider.org

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

CMS (Drupal 7) + CMS-rendered Website + Touch Wall (Cinder/C++) + 2 Touchscreen Interactives (AngularJS) + iOS / Android Native Applications Smithsonian National Air and Space Museum airandspace.si.edu

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

PROS and CONS

Slide 49

Slide 49 text

Pros

Slide 50

Slide 50 text

Pros •Back and Front End systems are swappable

Slide 51

Slide 51 text

Pros •Back and Front End systems are swappable •Teams can divide and conquer

Slide 52

Slide 52 text

Cons

Slide 53

Slide 53 text

Cons •Larger tech stack (Drupal, JS, multiple environments)

Slide 54

Slide 54 text

Cons •Larger tech stack (Drupal, JS, multiple environments) •Maintenance

Slide 55

Slide 55 text

Cons •Larger tech stack (Drupal, JS, multiple environments) •Maintenance •For websites you lose built-in functionality of CMS: menus/routing/accessibility/SEO

Slide 56

Slide 56 text

3. Decoupling Drupal

Slide 57

Slide 57 text

Start with Content

Slide 58

Slide 58 text

Start with Content •Getting content ready to travel

Slide 59

Slide 59 text

Start with Content •Getting content ready to travel •NO Presentation specific names

Slide 60

Slide 60 text

Start with Content •Getting content ready to travel •NO Presentation specific names •Decouple your mind

Slide 61

Slide 61 text

Start with Content •Getting content ready to travel •NO Presentation specific names •Decouple your mind •Content in many forms/faces

Slide 62

Slide 62 text

Example: Two Content Types

Slide 63

Slide 63 text

Example: Two Content Types •Author

Slide 64

Slide 64 text

Example: Two Content Types •Author •Book

Slide 65

Slide 65 text

Author

Slide 66

Slide 66 text

Book

Slide 67

Slide 67 text

HOW?? There’s lots of ways:

Slide 68

Slide 68 text

HOW?? There’s lots of ways: •Core: RESTful Web Services

Slide 69

Slide 69 text

HOW?? There’s lots of ways: •Core: RESTful Web Services •Custom Controller

Slide 70

Slide 70 text

HOW?? There’s lots of ways: •Core: RESTful Web Services •Custom Controller •JSON API

Slide 71

Slide 71 text

HOW?? There’s lots of ways: •Core: RESTful Web Services •Custom Controller •JSON API •GraphQL

Slide 72

Slide 72 text

RESTful Web Services Two basic approaches:

Slide 73

Slide 73 text

RESTful Web Services Two basic approaches: •Core RESTful Services

Slide 74

Slide 74 text

RESTful Web Services Two basic approaches: •Core RESTful Services •REST Exports

Slide 75

Slide 75 text

Core RESTful Services

Slide 76

Slide 76 text

Core RESTful Services •Core REST Module

Slide 77

Slide 77 text

Core RESTful Services •Core REST Module •REST UI Module https://drupal.org/project/restui

Slide 78

Slide 78 text

Request: /node/1?format=json

Slide 79

Slide 79 text

{ "nid": [ { "value": 1 } ], "uuid": [ { "value": "3036ea2d-7502-4c64-8bc6-2e9ee3a0f897" } ], "vid": [ { "value": 1 } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "book", "target_type": "node_type", "target_uuid": "a3c32842-68b2-46fd-b70e-d6ed9e71ee2d" } ], "revision_timestamp": [ { "value": "2018-04-23T18:10:59+00:00", "format": "Y-m-d\\TH:i:sP" } ], "revision_uid": [ { "target_id": 1, "target_type": "user", "target_uuid": "a7484c09-d013-402e-b070-46c0d84a7b28", "url": "/user/1" } ], "revision_log": [], "status": [ { "value": true } ], "title": [ { "value": "The Fifth Season" } ], "uid": [ { "target_id": 1, "target_type": "user", "target_uuid": "a7484c09-d013-402e-b070-46c0d84a7b28", "url": "/user/1" } ], "created": [ { "value": "2018-04-23T18:10:29+00:00", "format": "Y-m-d\\TH:i:sP" } ], "changed": [ { "value": "2018-04-23T18:10:59+00:00", "format": "Y-m-d\\TH:i:sP" } ], "promote": [ { "value": true } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": null, "pid": null, "langcode": "en" } ], "body": [ { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } ] }

Slide 80

Slide 80 text

{ "nid": [ { "value": 1 } ], "type": [ { "target_id": "book", "target_type": "node_type", "target_uuid": "a3c32842-68b2-46fd-b70e-d6ed9e71ee2d" } ], "title": [ { "value": "The Fifth Season" } ], "body": [ { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } ] }

Slide 81

Slide 81 text

REST Exports

Slide 82

Slide 82 text

REST Exports •Views! (! old friend)

Slide 83

Slide 83 text

REST Exports •Views! (! old friend) •“Provide a REST Export” checkbox ✅

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

[ { "title": "Kim Stanley Robinson", "body": "

Author of the Mars trilogy and New York 2140.

\r\n", "field_books": [ "2" ] }, { "title": "N. K. Jemisin", "body": "

Hugo Award-winning author of the Broken Earth trilogy.

\r\n", "field_books": [ "1" ] } ]

Slide 88

Slide 88 text

Custom Controller

Slide 89

Slide 89 text

Custom Controller

Slide 90

Slide 90 text

Custom Controller •Routing (YML)

Slide 91

Slide 91 text

Custom Controller •Routing (YML) •Controller Class

Slide 92

Slide 92 text

Routing mann.season: path: 'api/season' defaults: _controller: \Drupal\mann_api\Controller\Season::api methods: [GET] requirements: _access: 'TRUE'

Slide 93

Slide 93 text

… $a_query = \Drupal::entityQuery('node'); $a_query->condition('status', 1); $a_query->condition('type', 'event'); $entity_ids = $a_query->execute(); $events = Node::loadMultiple($entity_ids); foreach ($events as $event) { $item['id'] = (int) $event->nid->value; $date = $event->field_event_date->value; $item['date'] = $date; $item['title'] = $event->title->value; $item['display_title'] = $event->field_display_title->value; $image_data = MediaAssetService::getMediaPathSingle($event, 'field_featured_image'); $item['image'] = urldecode($image_data['image']); $item['image_relative'] = urldecode($image_data['image_relative']); $data[] = $item; } $response = new JsonResponse(['data' => $data]); return $response; …

Slide 94

Slide 94 text

JSON API drupal.org/project/jsonapi

Slide 95

Slide 95 text

Out of the box: /jsonapi/node/[Content Type] for example: /jsonapi/node/author

Slide 96

Slide 96 text

{ "data": [ { "type": "node--author", "id": "88223a76-278d-4fc6-9945-0bdb56cc78d3", "attributes": { "nid": 2, "body": { "value": "

Winner of the Hugo Award.

\r\n", "format": "basic_html", "processed": "

Winner of the Hugo Award.

", "summary": "" }, "field_display_name": { "value": "N. K. Jemisin", "format": "basic_html", "processed": "N. K. Jemisin" } }, "relationships": { "field_books": { "data": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f" } ], }, } ], }

Slide 97

Slide 97 text

{ "attributes": { "nid": 2, "body": { "value": "

Winner of the Hugo Award.

\r\n", "format": "basic_html", "processed": "\

Winner of the Hugo Award.

", "summary": "" }, "field_display_name": { "value": "N. K. Jemisin", "format": "basic_html", "processed": "N. K. Jemisin" } }, }

Slide 98

Slide 98 text

{ "relationships": { "field_books": { "data": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f" } ], }, }

Slide 99

Slide 99 text

{ "relationships": { "field_books": { "data": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f" } ], }, }

Slide 100

Slide 100 text

{ "relationships": { "field_books": { "data": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f" } ], }, }

Slide 101

Slide 101 text

Relationships are complicated /jsonapi/node/[Content Type]?include=[Field Name] for example (we want field_books): /jsonapi/node/author?include=field_books

Slide 102

Slide 102 text

{ "included": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f", "attributes": { "nid": 1, "title": "The Fifth Season", "body": { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } }, } }

Slide 103

Slide 103 text

{ "included": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f", "attributes": { "nid": 1, "title": "The Fifth Season", "body": { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } }, } }

Slide 104

Slide 104 text

{ "included": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f", "attributes": { "nid": 1, "title": "The Fifth Season", "body": { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } }, } }

Slide 105

Slide 105 text

{ "included": [ { "type": "node--book", "id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f", "attributes": { "nid": 1, "title": "The Fifth Season", "body": { "value": "

Part one of the Broken Earth trilogy.

\r\n", "format": "basic_html", "processed": "

Part one of the Broken Earth trilogy.

", "summary": "" } }, } }

Slide 106

Slide 106 text

"id": "e8c31c68-4fe5-4046-ab3f-1cb42e1f314f"

Slide 107

Slide 107 text

GraphQL github.com/drupal-graphql

Slide 108

Slide 108 text

Installation Note

Slide 109

Slide 109 text

Installation Note •Download the module (or use drush dl graphql)

Slide 110

Slide 110 text

Installation Note •Download the module (or use drush dl graphql) •Run composer require webonyx/graphql-php at root level (error otherwise)

Slide 111

Slide 111 text

Installation Note •Download the module (or use drush dl graphql) •Run composer require webonyx/graphql-php at root level (error otherwise) •Enable the module

Slide 112

Slide 112 text

Explorer allows you to test out queries

Slide 113

Slide 113 text

No content

Slide 114

Slide 114 text

Auto-complete!

Slide 115

Slide 115 text

No content

Slide 116

Slide 116 text

Simple Query query { nodeQuery { entities { entityId, entityLabel } } }

Slide 117

Slide 117 text

{ "data": { "nodeQuery": { "entities": [ { "entityId": "1", "entityLabel": "The Fifth Season" }, { "entityId": "2", "entityLabel": "New York 2140" }, { "entityId": "3", "entityLabel": "N. K. Jemisin" }, { "entityId": "4", "entityLabel": "Kim Stanley Robinson" } ] } } }

Slide 118

Slide 118 text

Node Query w/ Types (Author) query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } } } }

Slide 119

Slide 119 text

Node Query w/ Types (Author) query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } } } }

Slide 120

Slide 120 text

Node Query w/ Types (Author) query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } } } }

Slide 121

Slide 121 text

Node Query w/ Types (Author) query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } } } }

Slide 122

Slide 122 text

Node Query w/ Types (Author) query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } } } }

Slide 123

Slide 123 text

References are Easy(ish) fieldBooks { entity { entityId title } }

Slide 124

Slide 124 text

{ "data": { "nodeQuery": { "entities": [ {}, {}, { "entityId": "3", "title": "N. K. Jemisin", "body": { "value": "

Hugo Award-winning author of the Broken Earth trilogy.

\r\n" }, "fieldDisplayName": { "value": "N. K. Jemisin" }, "fieldBooks": [ { "entity": { "entityId": "1", "title": "The Fifth Season" } } ] }, … ] } } }

Slide 125

Slide 125 text

{ "data": { "nodeQuery": { "entities": [ {}, {}, { "entityId": "3", "title": "N. K. Jemisin", "body": { "value": "

Hugo Award-winning author of the Broken Earth trilogy.

\r\n" }, "fieldDisplayName": { "value": "N. K. Jemisin" }, "fieldBooks": [ { "entity": { "entityId": "1", "title": "The Fifth Season" } } ] }, … ] } } }

Slide 126

Slide 126 text

{ "data": { "nodeQuery": { "entities": [ {}, {}, { "entityId": "3", "title": "N. K. Jemisin", "body": { "value": "

Hugo Award-winning author of the Broken Earth trilogy.

\r\n" }, "fieldDisplayName": { "value": "N. K. Jemisin" }, "fieldBooks": [ { "entity": { "entityId": "1", "title": "The Fifth Season" } } ] }, … ] } } }

Slide 127

Slide 127 text

query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } ...on NodeBook { entityId title body { value } } } } }

Slide 128

Slide 128 text

query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } ...on NodeBook { entityId title body { value } } } } }

Slide 129

Slide 129 text

query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } ...on NodeBook { entityId title body { value } } } } }

Slide 130

Slide 130 text

query { nodeQuery { entities { ...on NodeAuthor { entityId title body { value } fieldDisplayName { value } fieldBooks { entity { entityId title } } } ...on NodeBook { entityId title body { value } } } } }

Slide 131

Slide 131 text

Filter by Node Type query { nodeQuery (filter: {conditions: [{ field: "type" value: "author" operator: EQUAL }] } ) { … } }

Slide 132

Slide 132 text

Filter by Node Type query { nodeQuery (filter: {conditions: [{ field: "type" value: "author" operator: EQUAL }] } ) { … } }

Slide 133

Slide 133 text

Filter by Node Type query { nodeQuery (filter: {conditions: [{ field: "type" value: "author" operator: EQUAL }] } ) { … } }

Slide 134

Slide 134 text

Filter by Node Type query { nodeQuery (filter: {conditions: [{ field: "type" value: "author" operator: EQUAL }] } ) { … } }

Slide 135

Slide 135 text

query { nodeQuery (filter: {conditions: [{ field: "type" value: "author" operator: EQUAL }] } ) { entities { ...on NodeAuthor { entityId title body { value } fieldBooks { entity { title body { value } } } } } } }

Slide 136

Slide 136 text

{ "data": { "nodeQuery": { "entities": [ { "entityId": "3", "title": "N. K. Jemisin", "body": { "value": "

Hugo Award-winning author of the Broken Earth trilogy.

\r\n" }, "fieldBooks": [ { "entity": { "title": "The Fifth Season", "body": { "value": "

Part one of the Broken Earth trilogy.

\r\n" } } } ] },

Slide 137

Slide 137 text

Aliases and Multiple Queries Take a simple Image Media Bundle entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 138

Slide 138 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 139

Slide 139 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 140

Slide 140 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 141

Slide 141 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 142

Slide 142 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 143

Slide 143 text

entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }

Slide 144

Slide 144 text

This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }

Slide 145

Slide 145 text

This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }

Slide 146

Slide 146 text

This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }

Slide 147

Slide 147 text

This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }

Slide 148

Slide 148 text

What if we need multiple derivatives? Enter aliases.

Slide 149

Slide 149 text

What if we need multiple derivatives? Enter aliases. An alias allows you to run multiple queries for the same field and map them to different names.

Slide 150

Slide 150 text

fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { thumbnail:derivative(style: THUMBNAIL) { url width height } large:derivative(style: LARGE) { url width height } url width height alt title } } }

Slide 151

Slide 151 text

fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { thumbnail:derivative(style: THUMBNAIL) { url width height } large:derivative(style: LARGE) { url width height } url width height alt title } } }

Slide 152

Slide 152 text

fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { thumbnail:derivative(style: THUMBNAIL) { url width height } large:derivative(style: LARGE) { url width height } url width height alt title } } }

Slide 153

Slide 153 text

fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { thumbnail:derivative(style: THUMBNAIL) { url width height } large:derivative(style: LARGE) { url width height } url width height alt title } } }

Slide 154

Slide 154 text

Bonus: Communication

Slide 155

Slide 155 text

We’ve tried:

Slide 156

Slide 156 text

We’ve tried: •Polling for changes (are we there yet?)

Slide 157

Slide 157 text

We’ve tried: •Polling for changes (are we there yet?) •NodeJS (get a server in the middle, maybe Socket I/O)

Slide 158

Slide 158 text

Enter Progressive Web Applications

Slide 159

Slide 159 text

Enter Progressive Web Applications •CMS to Application communication is a use case

Slide 160

Slide 160 text

Enter Progressive Web Applications •CMS to Application communication is a use case •PWAs have Service Workers and Push Notifications

Slide 161

Slide 161 text

Web Push API

Slide 162

Slide 162 text

Web Push API •Gives web applications the ability to receive messages pushed to them from a server

Slide 163

Slide 163 text

Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser

Slide 164

Slide 164 text

Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser •You can pass “messages”, but fundamentally you are passing data for your app or website to interpret as you see fit

Slide 165

Slide 165 text

Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser •You can pass “messages”, but fundamentally you are passing data for your app or website to interpret as you see fit •Browsers handle pushing the data through Service Workers, so a third party is not required

Slide 166

Slide 166 text

Fine Print

Slide 167

Slide 167 text

Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?)

Slide 168

Slide 168 text

Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?) •Spec is considered experimental, so it may change in the future

Slide 169

Slide 169 text

Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?) •Spec is considered experimental, so it may change in the future •Great for kiosks, but in the wild, you can’t guarantee that a user will subscribe

Slide 170

Slide 170 text

Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?) •Spec is considered experimental, so it may change in the future •Great for kiosks, but in the wild, you can’t guarantee that a user will subscribe •Doesn’t help with non-web-based projects (Cinder/ C++, Unity)

Slide 171

Slide 171 text

No content

Slide 172

Slide 172 text

Where to Next?

Slide 173

Slide 173 text

Where to Next? •Two-way communication

Slide 174

Slide 174 text

Where to Next? •Two-way communication •Electron wrappers for JS interactives

Slide 175

Slide 175 text

Where to Next? •Two-way communication •Electron wrappers for JS interactives •Preview modes for interactives

Slide 176

Slide 176 text

Takeaways

Slide 177

Slide 177 text

Takeaways •Start with your Content, and make that portable

Slide 178

Slide 178 text

Takeaways •Start with your Content, and make that portable •There’s many different ways to expose your content

Slide 179

Slide 179 text

Takeaways •Start with your Content, and make that portable •There’s many different ways to expose your content •You can do this!

Slide 180

Slide 180 text

THANK YOU. Mark Llobrera Technology Director, Bluecadet Philadelphia https://speakerdeck.com/mllobrera @dirtystylus @bluecadet