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
61
Preparing for the future of API Description Languages
kylef
0
79
Resilient API Design
kylef
1
280
Building a Swift Web API and Application Together
kylef
2
1.8k
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
620
Practical Declarative Programming (360 iDev 2015)
kylef
3
440
Other Decks in Technology
See All in Technology
持続可能なソフトウェア開発を支える『GitHub CI/CD実践ガイド』
tmknom
8
1.4k
自作Cコンパイラ 8時間の奮闘
soukouki
0
850
テスト”ケース”駆動開発 で手戻りをなくそう
ryohma0510
0
330
AI前提のサービス運用ってなんだろう?
ryuichi1208
1
540
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
260
より快適なエラーログ監視を目指して
leveragestech
4
1.5k
Segment Anything Model 2
tenten0727
3
710
株式会社EventHub・エンジニア採用資料
eventhub
0
3k
OSTという文化を組織に根付かせてみた
sansantech
PRO
2
400
再考 アクターモデル/ reconsider actor model
ytake
0
360
サーバー管理しないサーバーサービスManaged DevOps Pool
kkamegawa
0
130
「認証認可」という体験をデザインする ~Nekko Cloud認証認可基盤計画
logica0419
2
450
Featured
See All Featured
KATA
mclloyd
27
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Infographics Made Easy
chrislema
239
18k
Raft: Consensus for Rubyists
vanstee
136
6.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
89
16k
Designing the Hi-DPI Web
ddemaree
278
34k
Gamification - CAS2011
davidbonilla
79
5k
Fireside Chat
paigeccino
31
2.9k
GraphQLとの向き合い方2022年版
quramy
43
13k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Unsuck your backbone
ammeep
667
57k
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