Is That REST API Really RPC? Roy Fielding Seems to Think So

前端 未结 9 2505
日久生厌
日久生厌 2020-12-02 04:00

A large amount of what I thought I knew about REST is apparently wrong - and I\'m not alone. This question has a long lead-in, but it seems to be necessary because the infor

9条回答
  •  日久生厌
    2020-12-02 04:59

    I think over the number of years that REST has been out there now, technologists have come to terms with the concept of a Resource and what really is or isn't RESTful.

    According to the Richardson Maturity Model, there are 4 levels (0-3) that define how RESTful your API is, with 3 meaning a truly RESTful API, just as Roy Fielding intended it to be.

    Level 0 is when you have one entry point URI - like SOAP.

    Level 1 means the API is able to distinguish between different resources, and has more than one entry points - still smells of SOAP.

    Level 2 is when you use HTTP verbs - GET, POST, DELETE primarily. This is the level at which REST really comes into picture.

    At Level 3, you start using hypermedia controls to make your API truly RESTful.

    Suggested links for further reading:

    • What is the Richardson Maturity Model?
    • Martin Fowler's blog: Richardson Maturity Model

提交回复
热议问题