UX as an API

A presentation at Devoxx Belgium 2019 in November 2019 in Antwerp, Belgium by William Bartlett

Slide 1

Slide 1

UX as an API

William Bartlett

  • e-mail: w.bartlett@treeptik.fr
  • Twitter: @bartlettstarman
  • LinkedIn: punkstarman
  • GitHub: punkstarman

7 November, 2019 William Bartlett (@bartlettstarman) #Devoxx #uxasanapi 7 November, 2019 1 / 29

Slide 2

Slide 2

William Bartlett

  • Programmer
  • Agile coach
  • DevOps consultant
  • Fan of ergonomics

Slide 3

Slide 3

Mandatory Hand Raising Time

Slide 4

Slide 4

Disclaimers

This talk is not about

  • amazing UX
  • gorgeous graphic design
  • fully-loaded APIs

This talk is about a cool way of combining all of the above

Slide 5

Slide 5

Introduction

Slide 6

Slide 6

APIs abound

What are we using APIs for?

Slide 7

Slide 7

APIs abound

What are we using APIs for?

What tactics are we using to build our API landscape?

Slide 8

Slide 8

The English Plan

Slide 9

Slide 9

The Italian Plan

Slide 10

Slide 10

The Brazilian Plan

Slide 11

Slide 11

The French Plan

Slide 12

Slide 12

The Goal

The goal is the end-user

Slide 13

Slide 13

The Goal

The goal is the end-user

The end-user usually consumes a GUI

Slide 14

Slide 14

Micro-frontends

https://micro-frontends.org/

Slide 15

Slide 15

Third Party APIs

Slide 16

Slide 16

Problem

How to help customers seamlessly integrate your API into their UI?

Slide 17

Slide 17

Solution

Have API serve themeable UI fragments!

Slide 18

Slide 18

Related Work

Slide 19

Slide 19

There is nothing new under the sun

All of this has happened before, and it will all happen again. — J.M. Barrie, Peter Pan

Slide 20

Slide 20

Examples

Embedding

  • Ads
  • Chatbots
  • Charts
  • YouTube videos
  • Authentication
  • Payment
  • GDPR compliance

Slide 21

Slide 21

Related Solutions

Slide 22

Slide 22

Related Solutions

  • <iframe></iframe>
  • JavaScript SDK
  • Popup or redirection

Slide 23

Slide 23

Web Components as API

Slide 24

Slide 24

Web Components

  • Part of the platform (webcomponents.org)
  • JavaScript modules served over HTTP
  • Custom HTML elements
  • Scoped CSS
  • Properties

Slide 25

Slide 25

Examples

  • YouTube
  • Google Maps
  • GitHub
  • Atlassian Jira, Confluence
  • Cookie consent

Slide 26

Slide 26

Demo

Slide 27

Slide 27

O gods of Demo, we beseech thee

Slide 28

Slide 28

Gotchas

  • CORS
  • Dependency versions ➡️ Rollup
  • Package size vs developer experience ➡️ Lit-Element

Slide 29

Slide 29

Conclusion

Slide 30

Slide 30

Conclusion

UI fragment API

  • themeable
  • seamless
  • documenting API usage

Slide 31

Slide 31

Going Further

Slide 32

Slide 32

Going Further

  • Security, trust
  • Edge side includes
  • Organisms vs and molecules (Atomic Design, Brad Frost)
  • Animations