Using RESTful architecture to access multidimensional data

How do we use REST to effectively access multidimensional data? The selection looks like hi-REST, lo-REST or OpenSearch (which is similar to the lo-REST specialization).

+3
source share
2 answers

In order for your system to be RESTful, one of the requirements is that the client knows nothing about how your URIs are structured. This means that you cannot write code that builds URIs in the way most Twitter clients do. The usual wisdom is that in order for the resource to be located, you need to open its URI in another place.

, , . . , URI, .

OpenSearch - RESTful , , . OpenSearch HTML, (, ) :

<Url type="application/atom+xml"
     template="...search/?q={searchTerms}"/>

, , . ? OpenSearch . OpenSearch , URL-, , ( , xmlns:time :

<Url type="application/atom+xml"
     template="...search/?after={time:start}&amp;before={time:end}"/>

, , . .

OpenSearch, , - . -, . , ; - , , . , , name OpenSearch :

<Url type="application/atom+xml"
     template="...search?lastName={name:last}"/>

, name, , .

, ; . , OpenSearch , :

<Url type="application/atom+xml"
     template="...search/?latitude={geo:lat?}&amp;
                          longitude={geo:lon?}&amp;
                          metres={geo:radius?}"/>

, .

, (). , ? , , , :

. tha ( ):

<Url type="application/atom+xml"
     template="combo-find?customerLastName={name:last}&amp;
                          lat={geo:lat?}&amp;
                          lon={geo:lon?}&amp;
                          radius={geo:radius?}"/>

, ( OpenSearch Time , ):

<Url type="application/atom+xml"
     template="...search/?lastName={name:last}&amp;
                          lat={geo:lat?}&amp;
                          lon={geo:lon?}&amp;
                          r={geo:radius?}&amp;
                          after={time:start}&amp;
                          before={time:end}"/>

URI, , URI . , , URI, , URI .

RESTfulness , REST ; , - , .. OpenSearch - , !

+2

Google hi-REST lo_REST, , . , "" .

-REST, , "", , Hi-REST . , (.. XML, XML, JSON ..), .

0

Source: https://habr.com/ru/post/1760427/


All Articles