Jump to content

For those sick of hearing about RESTful APIs...

Recommended Posts

Well, it seems you don't like RESTful, hmm?

REST is useful, but it should not be used in inappropriate manners. REST is a way to access simple data structures via HTTP, not a way to access any data over HTTP, although it is possible.

There is no real sense in making every response in a forum accessible via REST, although you could. You could read it via GET, post it via POST and alter it via PUT. Then make the topic readable via a GET one level up, etcetera.

This is needlessly complex and doesn't do much good to the strength of REST.

If I'd have a IoT sensor (Internet of Things, not to be confused with Sensor Network) I could read the current temperature via a GET, get a history of the log via GET, or flush the log via DELETE. REST may seem excessive, but it enables M2M communications in a clearly defined way that is also fully compatible with internet technologies.

When I say internet technologies I want to point out that the internet is more than a worldwide network of TCP enabled machines, it is a worldwide network of HTTP/HTML enabled machines too. The strength of the internet is not only the network, but also the protocols. Before HTTP/HTML we had Gopher, newsgroups, BBS' and a lot more. All of these died (except maybe newsgroups for a subset of its former features), they didn't die because they used older networks, they died because they were superseeded by HTTP/HTML.

HTML isn't good per se, but it is so simple and so flexible that it allows for all our current applications in a compatible manner.

Link to post
Share on other sites

There's also the conflict between what the general software/services community understands REST to be, and what it really is.  For example, it has nothing inherently to do with simple data structures or HTTP, and it really is a way to efficiently access any data over a distributed network without needing to know much more than an identifier.


Before tossing the whole thing out, go read Fielding's dissertation.  It's an awesomely clean architectural style, but applying it properly is a lot harder than people think and involves understanding a large number of architectural constraints and elements.

Link to post
Share on other sites
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...