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
APIs and the Interconnected Web
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Darcy Laycock
March 15, 2013
Programming
300
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
APIs and the Interconnected Web
What APIs are, How APIs are increasingly important and how to make APIs that developers love.
Darcy Laycock
March 15, 2013
More Decks by Darcy Laycock
See All by Darcy Laycock
Learning by doing
sutto
1
97
Hacking Sidekiq for Fun (and Profit) - RubyConf Australia 2014
sutto
2
630
Building APIs Developers Love (LCA2014)
sutto
0
110
Rails Girls Perth 2013 - Intro Slides
sutto
0
130
Rails Girls Perth 2013 - Closing Slides
sutto
0
100
Testing in Ruby
sutto
3
200
Dr Smalltalk
sutto
1
140
port80 - Future of the Web
sutto
2
290
API Driven Applications
sutto
14
7.3k
Other Decks in Programming
See All in Programming
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
110
3Dシーンの圧縮
fadis
1
660
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
980
Claspは野良GASの夢をみるか
takter00
0
170
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.1k
Oxcを導入して開発体験が向上した話
yug1224
4
290
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
440
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
4.2k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
190
RTSPクライアントを自作してみた話
simotin13
0
500
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3k
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
The Curious Case for Waylosing
cassininazir
1
380
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
190
BBQ
matthewcrist
89
10k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
130
Art, The Web, and Tiny UX
lynnandtonic
304
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
720
Transcript
APIs - and - The Interconnected Web
I’m Darcy.
[email protected]
@sutto github.com/sutto
Filter Squad and we make apps as Discovr
I make and consume APIs.
If I talk too fast, yell “slow down”.
The Promise
“The Open Web”
... but not as you know it.
We’re still in a walled garden.
The Web is more than HTML, CSS and JavaScript.
The Web is a giant graph of data.
We’re not just talking about open standards.
Making data accessible.
Hack & Build upon the shoulders of giants.
The ability to make our own “web”.
And to share that web with others.
What is an API?
“An application programming interface (API) is a protocol intended to
be used as an interface by software components to communicate with each other”
None
Structured, Parseable Data.
None
{ "id": "723723854", "name": "Darcy Laycock", "first_name": "Darcy", "last_name": "Laycock",
"link": "https://www.facebook.com/darcy.laycock", "username": "darcy.laycock", "gender": "male", "locale": "en_GB" }
None
{ "login": "Sutto", "id": 553, "avatar_url": "https://truncated-url-goes-here/", "gravatar_id": "72d5f419e4a520ff4fe452400eac83d4", "url":
"https://api.github.com/users/Sutto", "html_url": "https://github.com/Sutto", "followers_url": "https://api.github.com/users/Sutto/followers", "following_url": "https://api.github.com/users/Sutto/following", "gists_url": "https://api.github.com/users/Sutto/gists{/gist_id}", "starred_url": "https://api.github.com/users/Sutto/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Sutto/subscriptions", "organizations_url": "https://api.github.com/users/Sutto/orgs", "repos_url": "https://api.github.com/users/Sutto/repos", "events_url": "https://api.github.com/users/Sutto/events{/privacy}", "received_events_url": "https://api.github.com/users/Sutto/received_events", "type": "User", "name": "Darcy Laycock", "company": "Filter Squad", "blog": "blog.ninjahideout.com", "location": "Perth, Western Australia", "email": "
[email protected]
", "hireable": false, "bio": null, "public_repos": 66, "followers": 210, "following": 209, "created_at": "2008-02-21T05:29:17Z", "updated_at": "2013-03-02T06:37:19Z", "public_gists": 112 }
Specifically for computer consumption.
An interface.
A promise.
The Web is not Web Sites.
The Web is HTTP.
Source: http://www.flickr.com/photos/girliemac/sets/72157628409467125
A Brief History of APIs.
HTTP
1991: HTTP 0.9
1996: HTTP 1.0
1997: HTTP 1.1
A stateless protocol.
Built for Hypertext.
WS -
WSDL
SOAP
We Love XML!
We Hate XML!
None
Atom
Web 2.0
aka “The Rise of the API”
REST
representational state transfer
Roy Fielding
REST
“REST”
Hypermedia!
Rich Internet Applications
None
The Age of the App.
None
None
70% of what I do on my phone every day
relies on an API.
APIs for...
None
Single Page Apps
Companies building tools for building APIs.
Why APIs Matter
Estimated 2,400,000,000+ on the internet. (http://www.internetworldstats.com/stats.htm)
Estimated 1,000,000,000+ smart phones in use. (http://bit.ly/eotw13-api-smartphone)
Facebook http://developers.facebook.com/
http://graph.facebook.com/quairading
Google Geocoding http://bit.ly/eotw13-api-geocoding
None
Twilio http://twilio.com/
Source: http://www.twilio.com/voice
Amazon Web Services http://aws.amazon.com
None
SoundCloud http://developers.soundcloud.com
None
Tesla Model S API http://bit.ly/eotw13-api-tesla
None
None
AirPlay http://nto.github.com/AirPlay.html
Source: http://www.flickr.com/photos/istig/5749756038/
Perth Transit http://doc.perthtransit.com
None
IFTTT http://iftt.com
None
How to make developers love you.
Because good just isn’t enough.
K.I.S.S.
Do just enough.
Treat your API as a communication medium.
Model it on languages.
Nouns are objects your API can expose.
Verbs are things you can do to APIs.
Adjectives are metadata.
Think in Object Graphs.
Be pragmatic.
Be consistent.
Make it easy to debug.
apiary.io
None
Start with JSON.
Design for JSON.
Build out as needed.
Don’t reinvent auth.
None
Always version your API.
It means you won’t break promises changing things.
Header based vs Path based.
/v1/ or /1/ at the start of the url.
Understand HTTP.
Incredibly simple!* * for varying definitions of simple.
Request / Response
GET POST HEAD
PUT DELETE TRACE CONNECT OPTIONS
PATCH LINK UNLINK
Status Codes
200 201 404 403 422
Headers!
X-Something-Huh: yes
Client Server Gateway
Caching!
ETags vs Cache-Control
Source: http://www.flickr.com/photos/samuraislice/3318411982/
Documentation is critical.
http://developer.github.com/v3/users/
Easy to read docs == Hard to write docs.
Explain things.
Explain how to use it.
None
If it takes me a day to see results, I’ll
just give up.
The browser is just another client.
None
Hypermedia
None
Similar in design to the web itself.
HTTP is about Hypermedia.
HTTP is about Hypermedia.
HATEOS
Hypermedia as the Engine of Application State.
Similar in spirit to REST as in Roy Fielding’s thesis.
Self Evident.
Discoverable.
Consistent.
JSON-HAL http://stateless.co/hal_specification.html
Collection+JSON http://bit.ly/eotw13-api-cjson
Tends to simplify API design.
Practical Concerns.
In closing
APIs are everywhere.
APIs power the web.
APIs help make the hard, easy.
Good APIs need consistency.
Don’t just build APIs.
Build APIs people love.
Learn HTTP
Live HTTP
Love HTTP
Embrace Data.
Share Data.
Care about making good APIs
Because you can make good APIs.
Because you can design great APIs.
Because the web is more than just HTML, CSS and
JS.
None
Thanks! http://developer.github.com http://apiary.io http://www.apigee.com http://soundcloud.com http://twilio.com http://developers.soundcloud.com http://www.designinghypermediaapis.com http://apigee.com/about/content/web-api-design http://speakerdeck.com/sutto