knackFX posterous

it's good to have the balls 
« Back to blog

REST in game

So, now a RESTFul hello world exists on Google App Engine, I can start woring on this brand new (to me) architecture : rest.
According to restlet documentation, the first step is to define what urls will be visible, before to define which services they will provide.
Obviously, before to define these urls, we have to define what we want to do server side.
For that, the wiki provides infos. Namely, what to do in first iterations. So, we have to

  • save player score each time he wants it to be saved (and has a login)
  • return a list of matching scores for
I do think all can be done with one URL call.
This call would be something like
http://knackfx.appspot.com/rest/scores
  • PUT will add a new player score for a game, it would require : player id, game name and score and would return list of nearby scores
  • GET with a score would display nearby scores
Obvously, we have to maintain a good enough code for allowing future versions to add things like game replay, comments, and so on ...
Well, now, it's time to say "This feature is just a bunch of code lines away !" and to start monkey coding :-)

Comments (0)

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     Connect     twitter