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
74
Preparing for the future of API Description Languages
kylef
0
89
Resilient API Design
kylef
1
310
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
470
Designing APIs for Humans - Write the Docs 2016
kylef
0
300
Embracing Change - MBLTDev 2015
kylef
3
650
Practical Declarative Programming (360 iDev 2015)
kylef
3
480
Other Decks in Technology
See All in Technology
AWSではじめる Web APIテスト実践ガイド / A practical guide to testing Web APIs on AWS
yokawasa
8
720
LINE NEWSにおけるバックエンド開発
lycorptech_jp
PRO
0
270
Amazon Q Developerの無料利用枠を使い倒してHello worldを表示させよう!
nrinetcom
PRO
2
120
AWSアカウントのセキュリティ自動化、どこまで進める? 最適な設計と実践ポイント
yuobayashi
7
640
Exadata Database Service on Cloud@Customer セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
2
1.5k
ディスプレイ広告(Yahoo!広告・LINE広告)におけるバックエンド開発
lycorptech_jp
PRO
0
390
AI Agent時代なのでAWSのLLMs.txtが欲しい!
watany
2
230
30→150人のエンジニア組織拡大に伴うアジャイル文化を醸成する役割と取り組みの変化
nagata03
0
180
Snowflake ML モデルを dbt データパイプラインに組み込む
estie
0
100
ESXi で仮想化した ARM 環境で LLM を動作させてみるぞ
unnowataru
0
180
Pwned Labsのすゝめ
ken5scal
2
450
AI自体のOps 〜LLMアプリの運用、AWSサービスとOSSの使い分け〜
minorun365
PRO
3
170
Featured
See All Featured
Speed Design
sergeychernyshev
27
810
Building Adaptive Systems
keathley
40
2.4k
Automating Front-end Workflow
addyosmani
1368
200k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
380
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Facilitating Awesome Meetings
lara
52
6.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
A better future with KSS
kneath
238
17k
Scaling GitHub
holman
459
140k
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