Posted by cayhorstmann
on October 17, 2008 at 4:37 PM PDT
When I read the REST tutorials, it all seemed so simple. But now I am designing my first set of REST queries, and I have lots of queries on how to be RESTful.
In my software engineering class, we are designing an application that shows films and events for the Cinequest film festival on Blackberry devices. We need to get film schedules and descriptions from a server onto the mobile phones. A typical query would be: “Show all movies playing today”.
SOAP seems total overkill, and I doubt that there is a SOAP stack for the BB. (A Google search yields this page .) So, I figured it is time to embrace REST.
There are lots of tutorials on the web, such as this one and this one . To query an entity, you simply use a URL
You can also consider sets of entities as resources, such as
If these entities or entity sets are immutable or change rarely, you can use the HTTP infrastructure for caching to reduce server load.
But my life isn't that simple. Moviegoers will want to see films by venue, by date, or by genre. So, what do I do? Following the examples, I would have queries
That seems pretty hokey. I don't want the server to parse the string and divine what I was after. I considered a couple of alternatives
That didn't seem to be much better. I ended up with
but it seems so RESTless. I'd love a pointer to a more in-depth tutorial or some expert opinion.
(The gratuitous image is the cover of a Korean movie "The Restless".)