json


HATEOS provide by server or client?


This is my first contact with HATEOS. I make a frontside client application which has to be connected with server using this format. I saw a JSON pattern with all hyperlinks refers to related objects.
My question is should I created those hyperlinks from client side app or this is the task for the server?
Links are generated on the server side.
You must distinguish between application state, and the state of a resource on a server. Clients handle application state. Servers handle resource state.
An application state determines “where” the client is in the process of completing a task, i.e.: where it is in its interaction with the server.
A resource state is the kind of persistent data a server stores, and lasts beyond the duration of a single session of interactions.
Along with the representation of a resource itself, comes some metadata (the “links” section in the JSON representation) telling the client what can be done next with that resource. To actually alter the resource state, the client has to follow one of the provided links, generated by the server.
Let’s take a concrete example that illustrates these concepts.
If you are browsing through a thumbnail gallery and the server has just sent you thumbnail number 23, your client cannot simply say “next” to the server, because this would imply that the server has to remember that your client application had asked for number 23 previously. And it would have to keep that “context” for each connected client. If instead, the client explicitly asks for thumbnail number 24 to advance in the gallery, the server is relieved from that burden: between two successive calls to your thumbnail service, the server hasn’t to remember anything. The “context” (i.e. the relevant part of application’s state) is kept on the client and explicitly passed to the server.
The good thing is that you don’t necessarily have to know either that you were viewing that specific thumbnail in the previous call. Because, along with the representation of this image, the server can send you links labeled “previous” and “next” leading to the corresponding thumbnails. At the time the server was generating the representation of thumbnail 23, the server had all information related to your request. It knew what thumbnail you requested, and what the previous and next ones were. It can therefore generate the corresponding links in the HATEOAS representation.

Related Links

How is this nil key into the hash?
How to avoid duplicate entries in mongoose
Resty-GWT MeduaType
How to evaluate a value as a variable in row returned by neo4j?
WSO2 ESB Custom Axis Module JSON Payload in MessageContext
Android - How can I access nested objects?
Json deserialization of Scala case objects with spray-json
JSON Structure/Syntax
What database model should be used with a bunch of different items?
JSON Property not binding to JSON.NET PropertyName in ASP.NET MVC 5 Post request
How to use Newtonsoft.Json as default in Asp.net Core Web Api?
Get product details in JSON format using REST API
Extract value from JSON
Get JSON stringify value
Express: Prevent bodyParser from parsing request
Nested arrays in json vs multiple separated json objects - performance

Categories

HOME
rest
ssas-2012
vb6
xamarin.android
blockchain
webrtc
search-engine
couchdb-2.0
checksum
defragmentation
jrebel
ext.net
eval
lotus-notes
wicket
cockroachdb
ssr
netezza
riak-ts
aptana
ios10.3
plsqldeveloper
marathon
raphael
jquery-form-validator
piwik
pipelinedb
hash-collision
widevine
bxslider
ivy
gpib
vegan
construct-2
backup-strategies
shapes
pycparser
rider
xen
freetts
jrules
finite-element-analysis
jdbi
email-parsing
fqdn
gd
jags
livefyre
applepayjs
shutdown
openh264
nuget-server
static-code-analysis
castle-dynamicproxy
build-process
galleriffic
instruments
multiple-file-upload
gradle-eclipse
contour
uwp-maps
anti-cheat
mfc-feature-pack
asymptote
datainputstream
jenkins-scriptler
hyperthreading
sourcegear-vault
qbfc
achartengine
epl
sysfs
named-ranges
line-numbers
temp-tables
mser
snmp4j
neoload
pic24
slick-2.0
mbox
help-viewer
opensocial
ksoap2
exiv2
layered
trimming
stagefright
visual-studio-2003
grunt-contrib-compass
appfog
database-permissions
reporting-tools
prng
qt4.6
returnurl
qsqltablemodel
autostart
cosm
jpf
entity-framework-ctp5
jquery-selectbox
yajl
callgrind
kpi
visual-studio-dbpro

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App