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.
Is it possible to customize persistent to have the same field names for json and lenses?
Accessing Custom Google Analytics Segments via Reporting API V4 [duplicate]
Hive not querying data stored in hdfs by flume
JSON with Angular js
cURL POST request to Node.js express server hosted on NGINX server returns a 502 error
JSON string parsing for ordered pairs in ruby
Converting JSON to String
Retrieve a JSON from API on node.js
What is the best way to have social network comments and posts model in PostgreSQL 9.6? [migrated]
Json unmarshal type model in golang
Logstash: send different json fields to different types in Elasticsearch
In Json4s why does an integer field in a JSON object get automatically converted to a String?
How to use jq to output JSONL (one independent JSON object per line)
How can I return JSON object list with Jersey/Jackson
SoapUI's Script Assertion is failing for the json response
WSO2 ESB Mediation Retrieve user attributes (claims) in inSequence