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
240
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
82
Preparing for the future of API Description Languages
kylef
0
98
Resilient API Design
kylef
1
320
Building a Swift Web API and Application Together
kylef
2
2k
Testing without Xcode - CMD+U 2016
kylef
0
240
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
480
Designing APIs for Humans - Write the Docs 2016
kylef
0
310
Embracing Change - MBLTDev 2015
kylef
3
670
Practical Declarative Programming (360 iDev 2015)
kylef
3
490
Other Decks in Technology
See All in Technology
ガバクラのAWS長期継続割引 ~次の4/1に慌てないために~
hamijay_cloud
1
570
AI駆動で進化する開発プロセス ~クラスメソッドでの実践と成功事例~ / aidd-in-classmethod
tomoki10
1
580
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
2
440
AIでめっちゃ便利になったけど、結局みんなで学ぶよねっていう話
kakehashi
PRO
1
510
Linuxのパッケージ管理とアップデート基礎知識
go_nishimoto
1
700
AndroidアプリエンジニアもMCPを触ろう
kgmyshin
2
550
今日からはじめるプラットフォームエンジニアリング
jacopen
8
1.9k
更新系と状態
uhyo
8
2.2k
Асинхронная коммуникация в Go: от понятного к душному. Дима Некрасов, Otello, 2ГИС
lamodatech
0
1.4k
DjangoCon Europe 2025 Keynote - Django for Data Science
wsvincent
0
360
Aspire をカスタマイズしよう & Aspire 9.2
nenonaninu
0
350
SREからゼロイチプロダクト開発へ ー越境する打席の立ち方と期待への応え方ー / Product Engineering Night #8
itkq
2
1.1k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.5k
Build your cross-platform service in a week with App Engine
jlugia
230
18k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Side Projects
sachag
453
42k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
RailsConf 2023
tenderlove
30
1.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
GitHub's CSS Performance
jonrohan
1030
460k
KATA
mclloyd
29
14k
Music & Morning Musume
bryan
47
6.5k
A Tale of Four Properties
chriscoyier
158
23k
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