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

http://someserver.com/prefix/film/112358

You can also consider sets of entities as resources, such as

http://someserver.com/prefix/films/mystery

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

http://someserver.com/prefix/films/CAL
http://someserver.com/prefix/films/2009-02-28
http://someserver.com/prefix/films/mystery

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

http://someserver.com/prefix/films/genre/mystery
http://someserver.com/prefix/filmsByGenre/mystery

That didn't seem to be much better. I ended up with

http://someserver.com/prefix/films?genre=mystery

http://yukina2x.files.wordpress.com/2007/06/the_restless.thumbnail.jpgbut 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".)