Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unleashing Hyperdrive
Search
Kyle Fuller
April 17, 2015
Technology
4
250
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
120
Preparing for the future of API Description Languages
kylef
0
110
Resilient API Design
kylef
1
340
Building a Swift Web API and Application Together
kylef
2
2k
Testing without Xcode - CMD+U 2016
kylef
0
260
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
490
Designing APIs for Humans - Write the Docs 2016
kylef
0
340
Embracing Change - MBLTDev 2015
kylef
3
690
Practical Declarative Programming (360 iDev 2015)
kylef
3
520
Other Decks in Technology
See All in Technology
HIG学習用スライド
yuukiw00w
0
110
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
370
計算機科学をRubyと歩む 〜DFA型正規表現エンジンをつくる~
ydah
3
130
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Shinya Takamaeda)
nao_sumikawa
0
120
小さな判断で育つ、大きな意思決定力 / 20251204 Takahiro Kinjo
shift_evolve
PRO
1
500
直接メモリアクセス
koba789
0
250
生成AI・AIエージェント時代、データサイエンティストは何をする人なのか?そして、今学生であるあなたは何を学ぶべきか?
kuri8ive
2
2k
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
130
なぜ使われないのか?──定量×定性で見極める本当のボトルネック
kakehashi
PRO
1
1.1k
安いGPUレンタルサービスについて
aratako
2
2.6k
なぜフロントエンド技術を追うのか?なぜカンファレンスに参加するのか?
sakito
10
2k
Modern Data Stack大好きマンが語るSnowflakeの魅力
sagara
0
300
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Automating Front-end Workflow
addyosmani
1371
200k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
A better future with KSS
kneath
240
18k
Designing for humans not robots
tammielis
254
26k
Scaling GitHub
holman
464
140k
Making Projects Easy
brettharned
120
6.5k
Producing Creativity
orderedlist
PRO
348
40k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
A Tale of Four Properties
chriscoyier
162
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