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
69
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
280
Embracing Change - MBLTDev 2015
kylef
3
640
Practical Declarative Programming (360 iDev 2015)
kylef
3
460
Other Decks in Technology
See All in Technology
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Qiita埋め込み用スライド
naoki_0531
0
860
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
160
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
260
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
ハイテク休憩
sat
PRO
2
140
20241220_S3 tablesの使い方を検証してみた
handy
3
340
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.2k
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
250
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
840
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
A Philosophy of Restraint
colly
203
16k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Thoughts on Productivity
jonyablonski
67
4.4k
Making the Leap to Tech Lead
cromwellryan
133
9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
The Cost Of JavaScript in 2023
addyosmani
45
7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Building Adaptive Systems
keathley
38
2.3k
GitHub's CSS Performance
jonrohan
1030
460k
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