Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Designing mobile friendly APIs
Search
Milan Cermak
February 13, 2014
Technology
0
110
Designing mobile friendly APIs
Slides from the talk I gave at 1st HTTP API group meetup in Berlin.
Milan Cermak
February 13, 2014
Tweet
Share
More Decks by Milan Cermak
See All by Milan Cermak
Building a CI/CD pipeline on AWS
milancermak
0
5.7k
HTTP API & Python
milancermak
3
270
Programování pro iOS z pohledu pythonistu
milancermak
0
270
Prečo povedať nie SQL
milancermak
1
130
Other Decks in Technology
See All in Technology
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
180
社内報はAIにやらせよう / Let AI handle the company newsletter
saka2jp
8
1.3k
関係性が駆動するアジャイル──GPTに人格を与えたら、対話を通してふりかえりを習慣化できた話
mhlyc
0
140
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.1k
Large Vision Language Modelを用いた 文書画像データ化作業自動化の検証、運用 / shibuya_AI
sansan_randd
0
130
生成AIで「お客様の声」を ストーリーに変える 新潮流「Generative ETL」
ishikawa_satoru
1
370
from Sakichi Toyoda to Agile
kawaguti
PRO
1
110
空間を設計する力を考える / 20251004 Naoki Takahashi
shift_evolve
PRO
4
450
Adminaで実現するISMS/SOC2運用の効率化 〜 アカウント管理編 〜
shonansurvivors
4
420
KMP の Swift export
kokihirokawa
0
350
extension 現場で使えるXcodeショートカット一覧
ktombow
0
220
Goに育てられ開発者向けセキュリティ事業を立ち上げた僕が今向き合う、AI × セキュリティの最前線 / Go Conference 2025
flatt_security
0
370
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
A better future with KSS
kneath
239
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Speed Design
sergeychernyshev
32
1.1k
Being A Developer After 40
akosma
91
590k
A designer walks into a library…
pauljervisheath
209
24k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Transcript
Mobile friendly APIs Milan Cermak HTTP API Meetup Group Berlin
Feb 13, 2014
General rules
be religious about documentation
when in doubt RFC 2616
Designing for mobile
Optimize for size and speed
• Bytes matter • Power consumption: • 3G > wifi
> 2G • On cellular, only 2 concurrent networking requests
Content-Encoding: gzip
ETag If-Match If-None-Match
Make the API flexible
Make the API flexible • fields parameter
GET /people/1! {“id”: 1,! “name”: “Milan Cermak”,! “age”: 27,! “hobbies”:
[“programming”, “ice cream”],! ...! }
GET /people/1?fields=name,age! {“name”: “Milan Cermak”,! “age”: 27}
Minimal vs. full approach ! • Send only the minimal
possible representation, let the users specify what they want via fields! • Send the full available representation of the resource
Make the API flexible • zoom parameter
GET /hobbies/programming! {“people”: [“1”, “2”, “3”, “5”, “8”, “11”],! “popularity”:
0.75,! ...! }
GET /hobbies/programming?zoom=people! {“people”: [! {“id”: 1,! “name”: “Milan Cermak”,! “age”:
27! ...! },! ...]! }
Batched requests
Batched requests • i.e. Facebook Graph API • A solution
until widespread adoption of HTTP2 • Not really RESTful, but really useful
POST /api/batch! {[! {“method”: “GET”! “relative_url”: “people/1”! },! {“method”: “GET”,!
“relative_url”: “hobbies/dogs”! }! ]}
Batched requests • Server-side implementation can be tricky: • Error
handling • HTTP headers • Parallel execution vs. POST/PUT/DELETE
Thank you