46
© 2015 Axway | @gssor 1 A Babel Fish from the Swamp of POX API Days Mediterranea Ross Garrett [email protected] @gssor May 6th, 2015

A Babel Fish from the Swamp of POX

Embed Size (px)

Citation preview

Page 1: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

1

A Babel Fish from the Swamp of POX API Days Mediterranea Ross Garrett [email protected] @gssor

May 6th, 2015

Page 2: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

2

A Babel Fish?

Page 3: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

3

A Babel Fish?

Page 4: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

4

A Swamp of POX?

h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html  

Page 5: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

5

Why are we here?

Page 6: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

6

The Web

“We propose the implementation of a simple scheme to incorporate several

different servers of machine-stored information already

available.”

- Berners-Lee / Cailliau, 1990

Page 7: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

7

The Web

“… web of nodes in which the user can browse at will.”

- Berners-Lee / Cailliau, 1990

Page 8: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

8

HTTP…

Page 9: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

9

Tell me what HTTP is?

Page 10: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

10

Tell me what HTTP is?

Hypertext Transfer Protocol

Page 11: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

11

Tell me what HTTP is?

How-To-Transfer Protocol

????

Page 12: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

12

HYPERTEXT

Page 13: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

13

Hypertext

Ted Nelson coins the word “Hypertext in

A File Structure for the Complex, the Changing, and the Indeterminate”

20th National Conference,

New York, Association for Computing Machinery,

1965.

Page 14: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

14

Hypertext

Hypertext is text which contains links to other texts.

Page 15: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

15

And by extension…

HyperMedia is a term used for hypertext which is not constrained

to be text

Page 16: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

16

Consider a Web Application http://www.facebook.com

Page 17: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

17

The Web is more than just HTTP

Page 18: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

18

The Web is more than just HTTP

•  HTTP •  URI •  HTML

We  need  to  use  ALL  of  the  Web  

Page 19: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

19

But have we forgotten this in a World of APIs?

Page 20: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

20

How-To-Transfer Protocol

Page 21: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

21

The Web

Page 22: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

22

A Reminder

Page 23: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

23 © 2015 Axway | Confidential 23

From the beginning then…

Page 24: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

24

The Swamp of POX

h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html    

Page 25: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

25

A example POX API

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 26: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

26

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 27: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

27

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 28: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

28

Level 1 - Resources

h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html    

Page 29: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

29

An example Level 1 API

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 30: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

30

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 31: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

31

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 32: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

32

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 33: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

33

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 34: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

34

Level 2 - HTTP Verbs

h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html    

Page 35: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

35

An example Level 2 API

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 36: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

36

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 37: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

37

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 38: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

38

Level 3 – Hypermedia Controls

h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html    

Page 39: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

39

An example Level 3 API

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 40: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

40

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 41: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

41

Looking at this as a Web Page

h"p://blog.sgo.to/2014/04/what-­‐your-­‐api-­‐would-­‐look-­‐like-­‐as-­‐webpage.html  

Page 42: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

42

Using ALL of the Web

•  Level 1 –  tackles the question of handling complexity by using

divide and conquer, breaking a large service endpoint down into multiple resources.

•  Level 2 –  introduces a standard set of verbs so that we handle

similar situations in the same way, removing unnecessary variation.

•  Level 3 –  introduces discoverability, providing a way of making

a protocol more self-documenting.

Page 43: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

43

Points to Note

•  XML is not the only way a resource can be represented

•  The choice of representation is left to the implementation

•  But remember the difference between Hypermedia formats and static formats –  HTML vs. TXT

Page 44: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

44

In Summary

•  Following principles of the Web – Scalable – Recoverable – Fault-Tolerable – Secure – Loosely Coupled

These  are  the  same  requirements  we  have  for  soHware  systems  

Page 45: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

45

Level 3 REST supports these requirements by using ALL of the Web

Page 46: A Babel Fish from the Swamp of POX

© 2015 Axway | @gssor

46

Thank You!

Ross Garrett [email protected] @gssor