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
210
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
47
Preparing for the future of API Description Languages
kylef
0
61
Resilient API Design
kylef
1
260
Building a Swift Web API and Application Together
kylef
2
1.7k
Testing without Xcode - CMD+U 2016
kylef
0
210
End-to-end: Building a Web Service in Swift (MCE 2016)
kylef
2
440
Designing APIs for Humans - Write the Docs 2016
kylef
0
270
Embracing Change - MBLTDev 2015
kylef
3
610
Practical Declarative Programming (360 iDev 2015)
kylef
3
410
Other Decks in Technology
See All in Technology
20240416_devopsdaystokyo
kzkmaeda
1
220
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
270
Cracking the KubeCon CfP
inductor
2
240
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
3
550
本当のAWS基礎
toru_kubota
0
510
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
150
JSON攻略法.pdf
miyakemito
8
5k
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
290
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
720
SPI原点回帰論:事業課題とFour Keysの結節点を見出す実践的ソフトウェアプロセス改善 / DevOpsDays Tokyo 2024
visional_engineering_and_design
4
1.9k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
In The Pink: A Labor of Love
frogandcode
138
21k
The Mythical Team-Month
searls
216
42k
The Pragmatic Product Professional
lauravandoore
25
5.8k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Web development in the modern age
philhawksworth
202
10k
For a Future-Friendly Web
brad_frost
172
9k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
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