Designing api for mobile apps

Maciek Opała
Wojtek Erbetowski

agenda



motivation

about us


teammates @ polidea

experience

A word about rest


back to the roots

the "re" in rest

A few words about representation (XML, JSON), not action

updating resources

PUT, POST, PATCH

why isn't it perfect for mobile

throughput and latency

updating app takes long

lang and tools more limited

Patterns (lessons learnt)

what apps do we discuss?


Homegrown!
Public mobile APIs(?)

http methods

How do you update a small information?
POST with the whole object
PATCH coming right up

using actions in paths


POST /user/37975/activate



thinner  client, more control


hateoas

... and linking between resources

multiple calls from mobile



embedding subresources


Paging

http cache


compatibility across clients

minimizing data size

compression

fields subsets

versioning


3 schools of versioning

path parameter

media type

subdomain

documenting services

and swagger

testing

case study - utest app

building middleware

joining responses

parallel requests

benchmark env

video

q&a

Designing api for mobile apps

By Wojtek Erbetowski

Designing api for mobile apps

  • 1,386