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
220
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
70
Preparing for the future of API Description Languages
kylef
0
85
Resilient API Design
kylef
1
290
Building a Swift Web API and Application Together
kylef
2
1.9k
Testing without Xcode - CMD+U 2016
kylef
0
220
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
450
Designing APIs for Humans - Write the Docs 2016
kylef
0
290
Embracing Change - MBLTDev 2015
kylef
3
640
Practical Declarative Programming (360 iDev 2015)
kylef
3
460
Other Decks in Technology
See All in Technology
Fearsome File Formats
ange
0
280
Storage Browser for Amazon S3
miu_crescent
1
300
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
2
310
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
190
Yahoo! ズバトクにおけるフロントエンド開発
lycorptech_jp
PRO
0
110
20241220_S3 tablesの使い方を検証してみた
handy
4
720
2024年にチャレンジしたことを振り返るぞ
mitchan
0
150
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
39
17k
podman_update_2024-12
orimanabu
1
300
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
680
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
130
ハイテク休憩
sat
PRO
2
180
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
67
4.5k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Practical Orchestrator
shlominoach
186
10k
Bash Introduction
62gerente
609
210k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Facilitating Awesome Meetings
lara
50
6.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Gamification - CAS2011
davidbonilla
80
5.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
530
Product Roadmaps are Hard
iamctodd
PRO
50
11k
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