Slide 1

Slide 1 text

FRONT TO BACK API DESIGN Z – @zdne Kyle – @kylefuller Apiary.io

Slide 2

Slide 2 text

API DESIGN API LIFECYCLE

Slide 3

Slide 3 text

WHAT IS API?

Slide 4

Slide 4 text

API is INTERFACE

Slide 5

Slide 5 text

DISTRIBUTED SYSTEMS

Slide 6

Slide 6 text

WEB APIs

Slide 7

Slide 7 text

API DESIGN

Slide 8

Slide 8 text

WEB APIs Tim Berners-Lee 1989 – Web Roy T Fielding 2000 – REST

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

REST ARCHITECTURE

Slide 11

Slide 11 text

REST ARCHITECTURE • Client–server • Stateless • Cacheable • Layered system • Code on Demand (optional) • Uniform Interface • Identification of resources • Manipulation through representations • Self-descriptive messages • Hypermedia as the engine of the application state

Slide 12

Slide 12 text

REST IS NOT… • REST is not pretty URLs • REST is not HTTP Verbs • REST is not CRUD • REST is not JSON

Slide 13

Slide 13 text

HOW DO YOU KNOW WHAT TO DO NEXT? On a web page

Slide 14

Slide 14 text

YOU CLICK ON ONE OF THE AVAILABLE LINKS On a web page

Slide 15

Slide 15 text

THE SERVER TELLS YOU WHAT LINKS ARE AVAILABLE On a web page

Slide 16

Slide 16 text

THIS IS HATEOAS Hypermedia as the engine of the application state

Slide 17

Slide 17 text

SERVER SHOULD PROVIDE LINKS CLIENT SHOULD RELY ON THEM

Slide 18

Slide 18 text

IF THEY DON’T AND API CHANGES…

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

HOW DO I DO DESIGN?

Slide 22

Slide 22 text

API Blueprint apiblueprint.org

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

API LIFECYCLE

Slide 25

Slide 25 text

prototype design implementation delivery & consumption feedback

Slide 26

Slide 26 text

DEMO

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

THANK YOU

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

CREDITS • http://apiary.io • http://apiblueprint.org • http://visual.ly/api-infographic • http://www.ics.uci.edu/~fielding/pubs/dissertation/ rest_arch_style.htm • http://roy.gbiv.com/untangled/2008/rest-apis-must-be- hypertext-driven • http://www.w3.org/People/Berners-Lee/Kids.html#What1