Is the RESTful API overuse / misuse?

I just spent the whole day reading Fielding's famous REST dissertation . The Conclusion section states that:

REST, a new architectural style for distributed hypermedia systems ....

Although web applications may include access to other interaction styles, hypermedia is the central focus of its protocol and performance problems. REST develops only those parts of the architecture that are considered necessary for widespread hypermedia interaction over the Internet .

And according to Wikipedia :

Hypermedia , an extension of the term hypertext, is a non-linear medium of information that includes graphics, audio, video, plain text and hyperlinks.

So, it seems to me that REST has a view web-based content-intensive system. But, obviously, RESTful APIit was buzzwordused almost everywhere relatively web service.

So what is overuse ? Or is it wrong to use ?

works:

RESTful API, a big lie.

What is RESTful programming?

What is "Hypermedia Data Formats" in Fielding's Famed dissertation when it comes to Cookies

+4
source share
1 answer

, JSON - , . , , , JSON, .

"" - , . JSON, : HAL, HATEAOS.

JSON. :

{
    "content": [ {
        "price": 499.00,
        "description": "Apple tablet device",
        "name": "iPad",
        "links": [ {
            "rel": "self",
            "href": "http://localhost:8080/product/1"
        } ],
        "attributes": {
            "connector": "socket"
        }
    }, {
        "price": 49.00,
        "description": "Dock for iPhone/iPad",
        "name": "Dock",
        "links": [ {
            "rel": "self",
            "href": "http://localhost:8080/product/3"
        } ],
        "attributes": {
            "connector": "plug"
        }
    } ],
    "links": [ {
        "rel": "product.search",
        "href": "http://localhost:8080/product/search"
    } ]
}   

, JSON .

API REST. API - , , API RPC, , : API RPC.

+5

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


All Articles