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
Building better clients
Search
Ben Longden
September 11, 2014
Technology
0
52
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
270
Adaptive and evolvable apps
blongden
0
410
Silex, the micro-framework
blongden
3
560
Other Decks in Technology
See All in Technology
オープンソースのハードウェアのコンテストに参加している話
iotengineer22
0
750
JavaのMCPサーバーで体験するAIエージェントの世界
tatsuya1bm
1
190
【ClickHouseMeetup】ClickHouseを活用したセキュリティログ解析AIエージェント『LogEater』とは
hssh2_bin
0
100
DevOpsDays Taipei 2025 - Opening Remarks
cheng_wei_chen
0
120
キャッシュレス決済のプロダクトから決済基盤への進化
b1a9id
0
160
Data Hubグループ 紹介資料
sansan33
PRO
0
1.8k
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
6k
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
1.4k
Eight Engineering Unit 紹介資料
sansan33
PRO
0
3.3k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
38k
AWS Lambdaでサーバレス設計を学ぼう_ベンダーロックインの懸念を超えて-サーバレスの真価を探る
fukuchiiinu
4
350
障害を回避するHttpClient再入門 / Avoiding Failures HttpClient Reintroduction
uskey512
1
390
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
Unsuck your backbone
ammeep
671
58k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
6
630
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
How STYLIGHT went responsive
nonsquared
100
5.6k
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)