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.5k
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
品質と速度の両立:生成AI時代の品質保証アプローチ
odasho
1
240
Delta airlines Customer®️ USA Contact Numbers: Complete 2025 Support Guide
deltahelp
0
430
面倒な作業はAIにおまかせ。Flutter開発をスマートに効率化
ruideengineer
0
230
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.7k
開発生産性を測る前にやるべきこと - 組織改善の実践 / Before Measuring Dev Productivity
kaonavi
8
2.1k
無意味な開発生産性の議論から抜け出すための予兆検知とお金とAI
i35_267
4
12k
20250705 Headlamp: 專注可擴展性的 Kubernetes 用戶界面
pichuang
0
250
Lazy application authentication with Tailscale
bluehatbrit
0
180
2025-07-06 QGIS初級ハンズオン「はじめてのQGIS」
kou_kita
0
160
生成AI時代の開発組織・技術・プロセス 〜 ログラスの挑戦と考察 〜
itohiro73
1
440
AIとともに進化するエンジニアリング / Engineering-Evolving-with-AI_final.pdf
lycorptech_jp
PRO
0
160
KiCadでPad on Viaの基板作ってみた
iotengineer22
0
290
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Building Adaptive Systems
keathley
43
2.7k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Balancing Empowerment & Direction
lara
1
430
Speed Design
sergeychernyshev
32
1k
Stop Working from a Prison Cell
hatefulcrawdad
270
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
A better future with KSS
kneath
238
17k
How GitHub (no longer) Works
holman
314
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
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