Top Banner
Decouple your mobile API now …don’t be sorry later ! Sept 2013 Romain Prieto
19

Decouple your mobile api now

Aug 15, 2015

Download

Technology

Romain Prieto
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Decouple your mobile api now

Decouple yourmobile API now

…don’t be sorry later !

Sept 2013Romain Prieto

Page 2: Decouple your mobile api now
Page 3: Decouple your mobile api now

BREAKING CHANGE

Page 4: Decouple your mobile api now
Page 5: Decouple your mobile api now

defensive / fallbacks

continuous checks

consumer-driver contracts

Page 6: Decouple your mobile api now

Display list of products

sorted by MagicRank ©

unless on sale

only best rated

Page 7: Decouple your mobile api now

Where does that logic sit?

Even if it’s UI related…

will you want to tweak it remotely?

Custom tailored

services

Page 8: Decouple your mobile api now

Many

capabilities

Page 9: Decouple your mobile api now

GET

/products

{ id: 1, name:

“chair” },

{ id: 2, name:

“table” }

GET

/products/1

{ price: 30, image:

“…” }

Page 10: Decouple your mobile api now

POST

/cart/items{ productId: 1,

quantity: 4 }

URI changes? …refactoring

Host changes? …micro-services

…infrastructure

upgrades

Page 11: Decouple your mobile api now

GET

/products

[{

id: 1,

name: “chair”,

details:

“/products/1”

}]

DATA

Page 12: Decouple your mobile api now

GET /config

{ cart:

“/cart/items” }

GET

/products/1{ cart: “/cart/items/1“, … }

SERVICES

or

Page 13: Decouple your mobile api now

SINGLE

PROXY

Page 14: Decouple your mobile api now

DISCOVERABLE

SERVICES

Page 15: Decouple your mobile api now
Page 16: Decouple your mobile api now

http://mark-kirby.co.uk/2013/creating-a-true-rest-api/

http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

http://madhatted.com/2013/3/19/suggested-rest-api-practices

http://offers.apigee.com/web-api-design-ebook/

http://kinderman.net/2010/06/23/approaching-pure-rest-learning-to-love-hateoas

http://stateless.co/hal_specification.html

https://kenai.com/projects/suncloudapis/pages/CloudAPIBackupRequests

a few more URLs

Page 17: Decouple your mobile api now

{ "op": "restore-Backup", "progress": 0, "target_uri": "/vms/33333/backups/456", "status_uri": "/statuses?op=restore-Backup&vm=3&b=456"}

SunCloud API (2009)

Page 18: Decouple your mobile api now

<link href="http://api-public.netflix.com/catalog/titles/series/70023522/cast" rel="http://schemas.netflix.com/catalog/people" title="cast">

<cast>

<link href="http://api-public.netflix.com/catalog/people/30011713" rel="http://schemas.netflix.com/catalog/person" title="Steve Carell” />

<link href="http://api-public.netflix.com/catalog/people/30014922" rel="http://schemas.netflix.com/catalog/person" title="John Krasinski” />

Netflix

Page 19: Decouple your mobile api now