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
47
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
210
Adaptive and evolvable apps
blongden
0
350
Silex, the micro-framework
blongden
3
510
Other Decks in Technology
See All in Technology
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
140
マルチアカウント環境への発見的統制の導入
ch1aki
1
1.3k
プロデザ! BY リクルート vol.18_リクルートのリサーチ実践組織「リサーチブーストコミュニティ」
recruitengineers
PRO
2
220
XSS using dirty Content Type in cloud era
flatt_security
2
1k
巨大なテーブルのテーブル定義を無停止で安全に誰でも変更できるようにする / Table-definitions-for-huge-tables-can-be-modified-by-anyone-safely-and-non-disruptively
freee
1
710
Let's get started with Ruby && Rails Tips
sinsoku
0
190
The CloudCompare project by Dr. Daniel Girardeau-Montaut
kentaitakura
0
490
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
0
280
WebアプリケーションにおけるPDOの使い方入門 / phpcon odawara 2024
meihei3
2
420
Four keys改善の取り組み事例紹介
sansantech
PRO
2
220
Data and AI Governance: Existing Challenges and Emerging Trends
scotthsieh825
0
140
CloudFrontの継続的デプロイを試してみたはなし
stknohg
PRO
0
620
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
7
2.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
The Invisible Customer
myddelton
114
12k
Agile that works and the tools we love
rasmusluckow
323
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
Done Done
chrislema
178
15k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Code Review Best Practice
trishagee
54
15k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.8k
Embracing the Ebb and Flow
colly
78
4.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)