Slide 1

Slide 1 text

Headless Drupal #HeadlessDrupal

Slide 2

Slide 2 text

Ruben Teijeiro @rteijeiro Drupal Hero

Slide 3

Slide 3 text

drupalhero.es

Slide 4

Slide 4 text

1xINTERNET.de

Slide 5

Slide 5 text

Conil

Slide 6

Slide 6 text

Front-end technologies evolve faster than Back-end technologies

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Web Applications Software Evolution

Slide 9

Slide 9 text

Custom Development from Scratch

Slide 10

Slide 10 text

Popular CMSs

Slide 11

Slide 11 text

Web Applications Architecture Evolution

Slide 12

Slide 12 text

Corporative Website

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Monolithic Application

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Microservices

Slide 19

Slide 19 text

Web Trends

Slide 20

Slide 20 text

Mobile Web/Apps

Slide 21

Slide 21 text

Browserless Devices

Slide 22

Slide 22 text

Internet of Things

Slide 23

Slide 23 text

Market Trends

Slide 24

Slide 24 text

Content Repositories https://www.acquia.com/products-services/acquia-content-hubvid

Slide 25

Slide 25 text

Digital Assets Management

Slide 26

Slide 26 text

Commercial API-frst CMSs https://www.contentful.com

Slide 27

Slide 27 text

Open Source API-frst CMSs https://getdirectus.com

Slide 28

Slide 28 text

What is Drupal doing to catch up with this trends?

Slide 29

Slide 29 text

Loosely Coupled Architecture

Slide 30

Slide 30 text

I love Twig!! Drupal 8 Front-end is @mortendk Certifed

Slide 31

Slide 31 text

Dynamic Page Cache https://www.drupal.org/docs/ 8/core/modules/dynamic- page-cache/overview

Slide 32

Slide 32 text

Big Pipe https://www.drupal.org/docs/8/core/modules/bigpipe/overview

Slide 33

Slide 33 text

Big Pipe https://www.drupal.org/docs/8/core/modules/bigpipe/overview

Slide 34

Slide 34 text

UX

Slide 35

Slide 35 text

Accessibility

Slide 36

Slide 36 text

Multilingual

Slide 37

Slide 37 text

Security

Slide 38

Slide 38 text

Drupalgeddon III

Slide 39

Slide 39 text

Major remote code execution vulnerability CVE-2018-7600 https://www.drupal.org/sa-core-2018-002 CVE-2018-7602 https://www.drupal.org/sa-core-2018-004

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

API-First Drupal

Slide 43

Slide 43 text

Headless Drupal

Slide 44

Slide 44 text

Decoupling

Slide 45

Slide 45 text

Decouple Frontend

Slide 46

Slide 46 text

Visitor-facing Experience

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Accessible Solutions

Slide 51

Slide 51 text

https://www.drupal.org/project/alexa https://www.youtube.com/watch?v=pZ-tBUdmzpo

Slide 52

Slide 52 text

Artifcial Intelligence

Slide 53

Slide 53 text

Chatbots https://www.youtube.com/watch?v=n7XyB1BoDF4

Slide 54

Slide 54 text

Mixed Reality

Slide 55

Slide 55 text

Augmented Reality https://www.youtube.com/watch?v=ZroFBG7-P7Q https://www.youtube.com/watch?v=t_5ZaC8YQ_8

Slide 56

Slide 56 text

Editorial Experience

Slide 57

Slide 57 text

https://developer.wordpress.com/calypso

Slide 58

Slide 58 text

Drupal 9?

Slide 59

Slide 59 text

Drupal Initiatives

Slide 60

Slide 60 text

API-First Initiative Making Drupal API-frst means making the data stored and managed by Drupal available for other software. https://www.drupal.org/node/2757967

Slide 61

Slide 61 text

JSON API Generate an API server that implements the {json:api} specifcation. https://www.drupal.org/project/jsonapi https://www.drupal.org/project/jsonapi_extras

Slide 62

Slide 62 text

GraphQL https://www.drupal.org/project/graphql http://graphql.org/swapi-graphql @thefubhy

Slide 63

Slide 63 text

RELAXed Web Services https://www.drupal.org/project/relaxed @dickolsson

Slide 64

Slide 64 text

Workfow Initiative https://www.drupal.org/node/2721129

Slide 65

Slide 65 text

http://www.drupaldeploy.org

Slide 66

Slide 66 text

Progressive Web Apps @nod_ https://www.drupal.org/project/pwa

Slide 67

Slide 67 text

@prestonso https://github.com/acquia/waterwheel.js https://github.com/acquia/waterwheel.swift

Slide 68

Slide 68 text

@wimleers https://github.com/acquia/reservoir

Slide 69

Slide 69 text

Contenta CMS http://www.contentacms.org Contenta is an API-First Drupal distribution

Slide 70

Slide 70 text

Enhanced Editorial Experiences With Drupal and React

Slide 71

Slide 71 text

Decoupled In-Place Editing App Drupal 8 + JSON API + React

Slide 72

Slide 72 text

● Full inline editing (WYSIWYG) ● Zero latency editing ● No page reloads ● Instant previewing ● “App feeling” for editor experience ● Easy access to information for visitors (aka non-editors) like in a standard decoupled scenario

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

● Page – Content Entity ● Fields - Entity references to Paragraphs ● Accordion ● Moodboard ● Text ● Image ● …

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

Pain Points

Slide 78

Slide 78 text

Performance Complex data structure for JSON- API Possible Solution: GraphQL

Slide 79

Slide 79 text

Content lock for collaborative editing Possible solutions: ● Middleware: Nodejs instance ● Entity reference revisions

Slide 80

Slide 80 text

UX Limitations Possible solutions: ● Improve editorial experience

Slide 81

Slide 81 text

Security

Slide 82

Slide 82 text

JOSE JSON Object Signing and Encryption JWT – JWS – JWE https://jwt.io https://speakerdeck.com/rdegges/jwts-suck-and-are-stupid

Slide 83

Slide 83 text

JWT - JSON Web Tokens Avoid server-side storage for sessions but any kind of session implementation will be interceptable if you don't use TLS, including JWT http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why- your-solution-doesnt-work/

Slide 84

Slide 84 text

JWS - JSON Web Signatures A standard that is supposed to provide message authentication or digital signatures. Two ways to attack a standards-compliant JWS library to achieve trivial token forgery: ● Send a header that specifes the none algorithm be used ● Send a header that specifes the HS256 algorithm when the application normally signs messages with an RSA public key. https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/

Slide 85

Slide 85 text

JWE - JSON Web Encryption Encryption leaves a lot of room for potential implementation errors, especially when asymmetric (a.k.a. public-key) encryption is involved. Public-key cryptography should be avoided if possible. https://blogs.adobe.com/security/2017/03/critical-vulnerability-uncovered-in-json- encryption.html

Slide 86

Slide 86 text

What should we use then?

Slide 87

Slide 87 text

PASETO Platform-Agnostic SEcurity Tokens Specifcation and reference implementation for secure stateless tokens https://github.com/paragonie/paseto

Slide 88

Slide 88 text

(local): Tamper-proof, short-lived immutable data stored on client machines. e.g. remember me on this computer cookies, which secure a unique ID that are used in a database lookup upon successful validation to provide long-term user authentication across multiple browsing sessions.

Slide 89

Slide 89 text

(public): Transparent claims provided by a third party. e.g. Authentication and authorization protocols (OAuth 2, OIDC).

Slide 90

Slide 90 text

Demo?

Slide 91

Slide 91 text

More about Security at Drupal HackCamp

Slide 92

Slide 92 text

Friday 15:30 – Room Softescu

Slide 93

Slide 93 text

Saturday 11:00 – Room Softescu

Slide 94

Slide 94 text

Saturday 12:00 – Room Optaros

Slide 95

Slide 95 text

Saturday 14:00 – Room Softescu JS and Security

Slide 96

Slide 96 text

Sunday 14:00 – Room Optaros

Slide 97

Slide 97 text

Resources https://dri.es/working-toward-a-javascript-driven-drupal- administration-interface https://www.drupal.org/project/drupal/issues/2926656 https://github.com/jsdrupal/drupal-admin-ui https://wimleers.com/blog/api-first-drupal-two-big-maintainability- milestones https://www.lullabot.com/articles/drupal-javascript-initiative-the-road- to-a-modern-administration-ui https://www.drupal.org/project/jsdrupal

Slide 98

Slide 98 text

Join the Code Sprints!!

Slide 99

Slide 99 text

drupalsurfcamp.com

Slide 100

Slide 100 text

No content

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

No content

Slide 103

Slide 103 text

Questions? ?

Slide 104

Slide 104 text

What did you think? Please rate this session https://www.surveymonkey.com/r/QTLXNVQ

Slide 105

Slide 105 text

Thanks!