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
72
Preparing for the future of API Description Languages
kylef
0
86
Resilient API Design
kylef
1
300
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
460
Designing APIs for Humans - Write the Docs 2016
kylef
0
290
Embracing Change - MBLTDev 2015
kylef
3
650
Practical Declarative Programming (360 iDev 2015)
kylef
3
470
Other Decks in Technology
See All in Technology
あなたはJVMの気持ちを理解できるか?
skrb
5
1.9k
ObservabilityCON on the Road Tokyoの見どころ
hamadakoji
0
120
生成AIを活用した機能を、顧客に提供するまでに乗り越えた『4つの壁』
toshiblues
1
180
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
150
クロスアカウントな RDS Snapshot Export による カジュアルなデータ集約の仕組み / 202501-finatext-technight-lt
wa6sn
1
120
製造業とソフトウェアは本当に共存できていたのか?品質とスピードを問い直す
takabow
13
4.3k
Tokyo RubyKaigi 12 - Scaling Ruby at GitHub
jhawthorn
2
160
インフラコストとセキュリティ課題解決のためのリアーキテクチャリング / srekaigi2025
hgsgtk
3
3.7k
トレードオフスライダーにおける品質について考えてみた
suzuki_tada
2
110
FinJAWS_reinvent2024_recap_database
asahihidehiko
2
310
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
340
インシデントキーメトリクスによるインシデント対応の改善 / Improving Incident Response using Incident Key Metrics
nari_ex
0
3.2k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
A Tale of Four Properties
chriscoyier
157
23k
Designing for humans not robots
tammielis
250
25k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
590
Building Adaptive Systems
keathley
39
2.4k
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