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
50
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
240
Adaptive and evolvable apps
blongden
0
380
Silex, the micro-framework
blongden
3
530
Other Decks in Technology
See All in Technology
エンジニアが一生困らない ドキュメント作成の基本
naohiro_nakata
3
160
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
380
強いチームと開発生産性
onk
PRO
28
8.8k
2024年グライダー曲技世界選手権参加報告/2024 WGAC report
jscseminar
0
300
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
190
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
140
AIチャットボット開発への生成AI活用
ryomrt
0
150
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
1
980
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
500
Microsoft Intune アプリのトラブルシューティング
sophiakunii
1
430
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
1
1.1k
形式手法の 10 メートル手前 #kernelvm / Kernel VM Study Hokuriku Part 7
ytaka23
5
820
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
570
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How GitHub (no longer) Works
holman
310
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Designing for humans not robots
tammielis
250
25k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Gamification - CAS2011
davidbonilla
80
5k
Building Your Own Lightsaber
phodgson
103
6.1k
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)