What exactly is RESTful programming?

前端 未结 30 3160
Happy的楠姐
Happy的楠姐 2020-11-21 06:02

What exactly is RESTful programming?

30条回答
  •  我在风中等你
    2020-11-21 06:39

    I apologize if I'm not answering the question directly, but it's easier to understand all this with more detailed examples. Fielding is not easy to understand due to all the abstraction and terminology.

    There's a fairly good example here:

    Explaining REST and Hypertext: Spam-E the Spam Cleaning Robot

    And even better, there's a clean explanation with simple examples here (the powerpoint is more comprehensive, but you can get most of it in the html version):

    http://www.xfront.com/REST.ppt or http://www.xfront.com/REST.html

    After reading the examples, I could see why Ken is saying that REST is hypertext-driven. I'm not actually sure that he's right though, because that /user/123 is a URI that points to a resource, and it's not clear to me that it's unRESTful just because the client knows about it "out-of-band."

    That xfront document explains the difference between REST and SOAP, and this is really helpful too. When Fielding says, "That is RPC. It screams RPC.", it's clear that RPC is not RESTful, so it's useful to see the exact reasons for this. (SOAP is a type of RPC.)

提交回复
热议问题