A Babel Fish from the Swamp of POX API Days Mediterranea Ross Garrett rgarrett@axway.com @gssor May 6th, 2015 © 2015 Axway | @gssor 1 A Babel Fish? © 2015 Axway | @gssor 2 A Babel Fish? © 2015 Axway | @gssor 3 A Swamp of POX? h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html © 2015 Axway | @gssor 4 Why are we here? © 2015 Axway | @gssor 5 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 © 2015 Axway | @gssor 6 The Web “… web of nodes in which the user can browse at will.” - Berners-Lee / Cailliau, 1990 © 2015 Axway | @gssor 7 HTTP… © 2015 Axway | @gssor 8 Tell me what HTTP is? © 2015 Axway | @gssor 9 Tell me what HTTP is? Hypertext Transfer Protocol © 2015 Axway | @gssor 10 Tell me what HTTP is? How-To-Transfer Protocol ???? © 2015 Axway | @gssor 11 HYPERTEXT © 2015 Axway | @gssor 12 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. © 2015 Axway | @gssor 13 Hypertext Hypertext is text which contains links to other texts. © 2015 Axway | @gssor 14 And by extension… HyperMedia is a term used for hypertext which is not constrained to be text © 2015 Axway | @gssor 15 Consider a Web Application http://www.facebook.com © 2015 Axway | @gssor 16 The Web is more than just HTTP © 2015 Axway | @gssor 17 The Web is more than just HTTP • HTTP • URI • HTML We need to use ALL of the Web © 2015 Axway | @gssor 18 But have we forgotten this in a World of APIs? © 2015 Axway | @gssor 19 How-To-Transfer Protocol © 2015 Axway | @gssor 20 The Web © 2015 Axway | @gssor 21 A Reminder © 2015 Axway | @gssor 22 From the beginning then… © 2015 Axway | Confidential © 2015 Axway | @gssor 23 The Swamp of POX h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html © 2015 Axway | @gssor 24 A example POX API h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 2015 Axway | @gssor 25 Looking at this as a Web Page h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 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 © 2015 Axway | @gssor 27 Level 1 - Resources h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html © 2015 Axway | @gssor 28 An example Level 1 API h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 2015 Axway | @gssor 29 Looking at this as a Web Page h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 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 © 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 © 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 © 2015 Axway | @gssor 33 Level 2 - HTTP Verbs h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html © 2015 Axway | @gssor 34 An example Level 2 API h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 2015 Axway | @gssor 35 Looking at this as a Web Page h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 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 © 2015 Axway | @gssor 37 Level 3 – Hypermedia Controls h"p://mar)nfowler.com/ar)cles/richardsonMaturityModel.html © 2015 Axway | @gssor 38 An example Level 3 API h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 2015 Axway | @gssor 39 Looking at this as a Web Page h"p://blog.sgo.to/2014/04/what-‐your-‐api-‐would-‐look-‐like-‐as-‐webpage.html © 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 © 2015 Axway | @gssor 41 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. © 2015 Axway | @gssor 42 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 © 2015 Axway | @gssor 43 In Summary • Following principles of the Web – Scalable – Recoverable – Fault-Tolerable – Secure – Loosely Coupled These are the same requirements we have for soHware systems © 2015 Axway | @gssor 44 Level 3 REST supports these requirements by using ALL of the Web © 2015 Axway | @gssor 45 Thank You! Ross Garrett rgarrett@axway.com @gssor © 2015 Axway | @gssor 46
© Copyright 2024