Loading ...
Sorry, an error occurred while loading the content.

18940CherryPy and REST: REST vs RPC and CherryPy dispatch methods

Expand Messages
  • Dan Stromberg
    Aug 2, 2012
    • 0 Attachment

      I just sent this to a CherryPy mailing list (web framework), but I thought I should ask the same question here too.  Sorry if I'm re-opening the scab on an old flame war!

      I've been asked to set up a generic REST interface for a variety of data, probably using CherryPy.  We don't appear to have a lot of REST under our belts (I know I don't), and I've heard there's a lot of misunderstanding of true REST around the internet (getting it conflated with the weaker goals of RPC), so naturally, I'd like to see if we can get it (REST) right from the start.  Getting it right seems (so far) to boil down to keeping the verbs (and adjectives?) out of our URL's, and just letting GET/PUT/POST/DELETE be our verbs, sent to noun-nodes in our hierarchy.

      We're having a discussion about using CherryPy's MethodDispatcher (CRUD) and RoutesDispatcher (whatever you make of it) - and perhaps others, and which would be better to encourage true REST.  I caught wind of a meme suggesting MethodDispatcher is more RESTful (more "directly" REST) than other dispatchers.  Would it be a bad thing to use one and not the other, for the sake of REST?  And is REST purity worth bothering with?  Is it a goal that often can't be reached 100%, but is still worth striving toward?

      Here's a pair of CherryPy Links about how to use MethodDispatcher and RoutesDispatcher:


    • Show all 9 messages in this topic