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

Artifactory REST API: how to add/append docker image artifacts to Build Info?
Angular2 http call and typified Observable problems
Query Elasticsearch JSON
Why Solr Deletes documents when only Update is executed?
How to convert a JSON file to another JSON file with different approach in React
Performance impact of Json type in Postgres
webpack $JSON.stringify.apply is not a function
How do I associate my value with its key when writing to Firebase in Swift 3?
Error while loading JSON data into HIVE table
status code: 400 swift 3 alamofire
Save JSON Response as Variable to Deserialise with SwiftyJSON
JSON document fails validation on JSON Schema
How to extratct financial data from SAP using webservice?
SearchBar Ionic 2
how to do json parser in android using json structure
Django session delete json object

Categories

HOME
nlp
wmic
google-contacts
agile
jbehave
camera-calibration
automata
sendkeys
opera-mini
atlassian-plugin-sdk
chocolatey
esql
sensu
cocoa-touch
ui5
pptp
vertex-buffer
xor
piecewise
clockwork
picturebox
hotmail
large-data
superpowered
rider
bigcartel
mongoexport
haskell-pipes
deepstream.io
ddms
html-agility-pack
finite-element-analysis
archer
lumen-5.3
tuleap
web-deployment-project
mbaas
httplib2
adler32
sqldatareader
android-navigationview
ebtables
hspec
packagemaker
uistackview
linkageerror
shipitjs
gradle-release-plugin
asp.net-mvc-partialview
usb-drive
qt-linguist
interactive-brokers
xmp
anythingslider
sonarqube5.3
direct3d12
function-fitting
hornetq
vips
wikitext
code-readability
apache-mina
epl
code-first-migrations
virus
android-search
google-admin-audit-api
author
magicalrecord-2.2
bfd
nimrod
va-list
stagefright
adomd.net
client-library
pascals-triangle
xml-libxml
pitch
responsetext
maven-ant-tasks
nintendo
scraperwiki
handwriting
django-nose
authenticode
.app
code-design
usability-testing
web-analytics-tools

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