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
Unleashing Hyperdrive
Search
Kyle Fuller
April 17, 2015
Technology
4
230
Unleashing Hyperdrive
Unleashing Hyperdrive, a Swift API client utilising Hypermedia and API Blueprint
Kyle Fuller
April 17, 2015
Tweet
Share
More Decks by Kyle Fuller
See All by Kyle Fuller
Design APIs and deliver what you promised
kylef
0
78
Preparing for the future of API Description Languages
kylef
0
93
Resilient API Design
kylef
1
310
Building a Swift Web API and Application Together
kylef
2
1.9k
Testing without Xcode - CMD+U 2016
kylef
0
230
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
470
Designing APIs for Humans - Write the Docs 2016
kylef
0
300
Embracing Change - MBLTDev 2015
kylef
3
660
Practical Declarative Programming (360 iDev 2015)
kylef
3
480
Other Decks in Technology
See All in Technology
やっぱり余白が大切だった話
kakehashi
PRO
7
2.8k
EM初心者として半年間マネジャーをやってみて分かったこと
sansantech
PRO
0
150
目次機能実装から理解するLexical Editor
wtdlee
0
110
AWS のポリシー言語 Cedar を活用した高速かつスケーラブルな認可技術の探求 #phperkaigi / PHPerKaigi 2025
ytaka23
7
1.1k
Explainable Fintech: A Transdisciplinary Perspective
avandeursen
0
120
UDDのすすめ
maguroalternative
0
600
fukuoka.ts #3 社内でESLintの共通設定を配りたい2025年春版
pirosikick
0
200
技術的負債を正しく理解し、正しく付き合う #phperkaigi / PHPerKaigi 2025
shogogg
2
800
AI の活用における課題と現状、今後の期待
asei
2
160
組織のスケールを見据えたプロジェクトリードエンジニア制度の実践 / Project Lead Engineer for Scaling Engineering Organization
ohbarye
13
2.8k
プロダクトの一番の理解者を目指してQAが取り組んでいること 〜現場・マネジメント各視点のプラクティス〜
hacomono
PRO
1
140
사이드 프로젝트를 20번 실패한 주니어의 오답노트 훔쳐보기(feat. KMP)
yjyoon
0
560
Featured
See All Featured
Designing Experiences People Love
moore
140
23k
The Language of Interfaces
destraynor
156
24k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Building Adaptive Systems
keathley
40
2.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Adopting Sorbet at Scale
ufuk
75
9.3k
The Cult of Friendly URLs
andyhume
78
6.3k
Unsuck your backbone
ammeep
669
57k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
11
1.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
GraphQLとの向き合い方2022年版
quramy
44
14k
Transcript
Hyperdrive API Client in Swift
None
Traditionally
"Move fast and break things" Mark Zuckerberg, Facebook
"Each version will remain for at least 2 years from
release." Facebook
None
None
Move Fast, Break Nothing
Designing API by exposing implementation details
API Evolvability
Ability to change implementation details
Learn about controls, relations and transitions at run-time
Adding new features
Remove features
Ability to change implementation details 4 Change fields used in
forms 4 Change validation of attributes in forms 4 Change URIs of resources (/polls/{id} -> / questions/{slug}) 4 Change HTTP methods (PUT -> PATCH) 4 Change the content-type
Teach Clients Semantic meaning of the Domain
Don’t hard-code implementation details
Hyperdrive
hyperdrive(apiary: "pollsapi")
hyperdrive(blueprint: "https://polls.apiblueprint.org/")
hyperdrive(apiary: "pollsapi") { result in // Explore API feature availability
}
hyperdrive.enter("https://polls.apiblueprint.org/") { result in // Explore API feature availability }
Representor
if let questions = representor.links["questions"] { // The API offered
us a link to questions } else { // Gracefully handle when this feature is missing }
hyperdrive.request(questions) { result in }
representor.links
representor.transitions
if let create = representor.transitions["create"] { // API supports creation
} else { // Feature is missing // Let's not show the create button in our UI }
let attributes = [ "question": "Favourite language?", "choices": [ "Swift",
"Ruby", "Python", ] ] hyperdrive.request(create, attributes) { }
create.attributes
None
create.validate(["email": "kyle"]) ❌
create.validate(["email": "
[email protected]
"]) ✅
None
None
Change our API
Demo
Hyperdrive
Hyperdrive β
None
kyle fuller kyle @ apiary.io