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
91
Preparing for the future of API Description Languages
kylef
0
100
Resilient API Design
kylef
1
330
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
320
Embracing Change - MBLTDev 2015
kylef
3
670
Practical Declarative Programming (360 iDev 2015)
kylef
3
500
Other Decks in Technology
See All in Technology
「どこにある?」の解決。生成AI(RAG)で効率化するガバメントクラウド運用
toru_kubota
2
280
評価の納得感を2段階高める「構造化フィードバック」
aloerina
1
130
Model Mondays S2E01: Advanced Reasoning
nitya
0
250
メルカリにおけるデータアナリティクス AI エージェント「Socrates」と ADK 活用事例
na0
16
8.8k
型システムを知りたい人のための型検査器作成入門
mame
14
3.5k
現場で役立つAPIデザイン
nagix
1
240
AI Engineering Summit Pre Event LT #10
okaru
2
560
AIコーディング新時代を生き残るための試行錯誤 / AI Coding Survival Guide
tomohisa
9
11k
Tenstorrent 開発者プログラム
tenstorrent_japan
0
290
dbt Cloudの新機能を紹介!データエンジニアリングの民主化:GUIで操作、SQLで管理する新時代のdbt Cloud
sagara
0
190
Introduction to Bill One Development Engineer
sansan33
PRO
0
250
堅牢な認証基盤の実現 TypeScriptで代数的データ型を活用する
kakehashi
PRO
1
200
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
68
11k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
123
52k
It's Worth the Effort
3n
184
28k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How to Ace a Technical Interview
jacobian
276
23k
Optimizing for Happiness
mojombo
379
70k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
How to train your dragon (web standard)
notwaldorf
92
6.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
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