[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] REST vs. HTTP in the real world



On Tue, 29 May 2007, James Andrewartha wrote:
> What about applications other than a webbrowser? With the POST-based
> one above the application would have to scrape the (X)HTML or have
> the variable names (action, doc, id) hard-coded. Whereas with a
> REST-based interface the application can just call the DELETE
> operation on the URI.

You continue to engage in sloppy thinking.

In the former case, there is no need for your application to scrape an 
(X)HTML service-description. You can just know what it is and program 
it directly. The (X)HTML serves to explain how the service works, that 
is, to describe the service; but once you know how the service works 
there is no need to parse the description.

In the latter case, how do you know what URL you need to 'delete' in 
order to remove section 2.1? Where is the interface description?

> So the solution is to give your sections descriptive names, and let
> the computer handle the numbering.

That's just so hopelessly naive I don't even know where to begin with 
it.

> In the example you give, the URI would be 
http://example.org/my-doc/installation/prerequisites which
> makes pretty clear what the result of a GET, PUT or DELETE on it is.

If you assume that resources are like files. Which you do.









-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.