Is REST only for Web APIs? If not, then what other systems can obey REST apart from Web APIs?

前端 未结 3 2013
孤街浪徒
孤街浪徒 2021-01-19 04:35

I hear people say as per Roy Feilding that REST is not just for web services. If so, what other systems/mechanisms/anything can use it?

相关标签:
3条回答
  • 2021-01-19 04:54

    Any system that has some type of access to the server, can even be an onboard system that has access to the API network

    0 讨论(0)
  • 2021-01-19 04:56

    Any system that uses URIs to communicate information would be able to use REST.

    Example: a theoretical database that fully follows REST rules.

    Example resource "serverhost/database/table/1"

    0 讨论(0)
  • 2021-01-19 05:03

    The REST interface is designed to be efficient for large-grain hypermedia data transfer -- Fielding, 2000.

    REST is intended for long-lived network-based applications that span multiple organizations -- Fielding, 2008

    The problem, of course, is that if that's what you need -- the web is sitting right there, so in most cases it's going to be more practical to adapt to the web as is, and perhaps extend it a little bit in a useful direction.

    The alternative requires not only re-inventing the wheel, but also persuading the world to adopt the new standard and use it.

    0 讨论(0)
提交回复
热议问题