$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building better clients
Search
Ben Longden
September 11, 2014
Technology
0
55
Building better clients
Ben Longden
September 11, 2014
Tweet
Share
More Decks by Ben Longden
See All by Ben Longden
Spryker, an architecture for the web
blongden
0
300
Adaptive and evolvable apps
blongden
0
410
Silex, the micro-framework
blongden
3
590
Other Decks in Technology
See All in Technology
Active Directory 勉強会 第 6 回目 Active Directory セキュリティについて学ぶ回
eurekaberry
10
3.7k
IaC を使いたくないけどポリシー管理をどうにかしたい
kazzpapa3
1
180
機械学習を「社会実装」するということ 2025年冬版 / Social Implementation of Machine Learning November 2025 Version
moepy_stats
4
870
マルチドライブアーキテクチャ: 複数の駆動力でプロダクトを前進させる
knih
0
12k
Codeer.LowCode.Blazor 紹介と成長録
wadawada
0
110
type-challenges を全問解いたのでエッセンスと推し問題を紹介してみる
kworkdev
PRO
0
130
『ソフトウェア』で『リアル』を動かす:クレーンゲームからデータ基盤までの統一アーキテクチャ / アーキテクチャConference 2025
genda
0
1.9k
AWS re:Invent 2025 で頻出の 生成 AI サービスをおさらい
komakichi
3
260
DGX SparkでローカルLLMをLangChainで動かした話
ruzia
0
130
AI エージェント活用のベストプラクティスと今後の課題
asei
2
400
"'TSのAPI型安全”の対価は誰が払う?不公平なスキーマ駆動に終止符を打つハイブリッド戦略
hal_spidernight
0
200
Symfony AI in Action
el_stoffel
2
220
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
How GitHub (no longer) Works
holman
316
140k
Writing Fast Ruby
sferik
630
62k
Code Reviewing Like a Champion
maltzj
527
40k
GraphQLとの向き合い方2022年版
quramy
49
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Building Adaptive Systems
keathley
44
2.8k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Being A Developer After 40
akosma
91
590k
Raft: Consensus for Rubyists
vanstee
140
7.2k
BBQ
matthewcrist
89
9.9k
The Cult of Friendly URLs
andyhume
79
6.7k
Transcript
BUILDING BETTER CLIENTS
BEN LONGDEN CTO Inviqa Enterprise open source
@BLONGDEN
There are two types of client
MACHINE DRIVEN
HUMAN DRIVEN
WHAT'S THE PROBLEM?
We're getting quite good better at building RESTful API's on
the server side.
But what about our clients?
Do they allow the API to change?
Consider the web browser.
What would the browser do? — Brian Sletten
Supports the most common media types.
application/x-shockwave-flash
Versioning
HTML
We're not building a web browser
But we can be inspired
CONTENT NEGOTIATION (CONNEG)
Send what your client will accept
Accept: application/hal+json, text/plain
Check what the server sends back
Content-Type: application/hal+json
Allow clients to support new media types when they become
available
Accept: application/hal+json, application/ vnd.error+json, text/plain;q=0.9
USE AN HTTP CLIENT
CACHEING
URLS
Remember that any GET request can be bookmarked by a
client
But also that it could result in a redirect
GUZZLE ▸ Cacheing ▸ Logging ▸ Oauth
HYPERMEDIA CONSTRAINT
Hypermedia is defined by the presence of application control information
embedded within, or as a layer above, the presentation of information — Roy Fielding
LINK RELATIONS POSSIBLE STATES
CONTEXT
{ "_links": { "self": { "href": "/comment/3864362" } }, "content":
"lol" }
{ "_links": { "edit": { "href": "/comment/3864362" }, "self": {
"href": "/comment/3864362" } }, "content": "lol" }
None
CLIENT CAN EVOLVE INDEPENDENTLY
None
Futureproof?
DESIGN OF EVERYDAY THINGS
Form a goal
Intention to act
Sequence of actions
Execution of the sequence of action
Perceive the state of the world
Interpret the perception
Evaluate the outcome
None
Why am I talking about this?
A hypermedia client works in much the same way
Let the server be in control
Use content negotiation to allow clients to evolve
Use an HTTP client and turn on cacheing
Drive human interaction through hypermedia controls
None
QUESTIONS! (or ask me at the bar later)