Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Unleashing Hyperdrive
Search
Kyle Fuller
April 17, 2015
Technology
270
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unleashing Hyperdrive
Unleashing Hyperdrive, a Swift API client utilising Hypermedia and API Blueprint
Kyle Fuller
April 17, 2015
More Decks by Kyle Fuller
See All by Kyle Fuller
Design APIs and deliver what you promised
kylef
0
160
Preparing for the future of API Description Languages
kylef
0
140
Resilient API Design
kylef
1
380
Building a Swift Web API and Application Together
kylef
2
2.2k
Testing without Xcode - CMD+U 2016
kylef
0
300
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
520
Designing APIs for Humans - Write the Docs 2016
kylef
0
380
Embracing Change - MBLTDev 2015
kylef
3
720
Practical Declarative Programming (360 iDev 2015)
kylef
3
570
Other Decks in Technology
See All in Technology
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
570
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
140
Loop Engineering これくらいでいい
mikanichinose
0
160
しろおびから始める!ログ活用の第一歩
shumei_ito
0
800
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.5k
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
630
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
170
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
120
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
370
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
How to build a perfect <img>
jonoalderson
1
6.1k
Design in an AI World
tapps
1
350
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Six Lessons from altMBA
skipperchong
29
4.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
610
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Google's AI Overviews - The New Search
badams
0
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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