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
260
4
Share
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
140
Preparing for the future of API Description Languages
kylef
0
130
Resilient API Design
kylef
1
350
Building a Swift Web API and Application Together
kylef
2
2.1k
Testing without Xcode - CMD+U 2016
kylef
0
290
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
510
Designing APIs for Humans - Write the Docs 2016
kylef
0
360
Embracing Change - MBLTDev 2015
kylef
3
700
Practical Declarative Programming (360 iDev 2015)
kylef
3
540
Other Decks in Technology
See All in Technology
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
1
150
(きっとたぶん)人材育成や教育のような何かの話
sejima
0
620
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
250
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
210
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (前半)
oracle4engineer
PRO
2
230
ハーネスエンジニアリング入門
hatyibei
0
100
AI와 협업하는 조직으로의 여정
arawn
0
590
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
290
音声言語モデル手法に関する発表の紹介
kzinmr
0
160
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
790
小さいVue.jsを30分で作る
hal_spidernight
0
140
拝啓、あの夏の僕へ〜あなたも知っているApp Runnerの世界〜
news_it_enj
0
210
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
290
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
Claude Code のすすめ
schroneko
67
220k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
So, you think you're a good person
axbom
PRO
2
2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The Curious Case for Waylosing
cassininazir
0
340
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
180
Building Adaptive Systems
keathley
44
3k
Bash Introduction
62gerente
615
210k
A Soul's Torment
seathinner
6
2.8k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
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