CherryPy and REST: REST vs RPC and CherryPy dispatch methods

Dan Stromberg <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CAGGBd_pqVt+izEu-oz8Ss=Pj_BL4ZzJKKQowKMNcTo30Ny5kGQ@mail.gmail.com>
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:
http://tools.cherrypy.org/wiki/HTTPMethodFiltering
http://tools.cherrypy.org/wiki/RoutesUrlMatching

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.