I am working on a project that involves mobile and web clients with Google's AppEngine PAAS. I would like to use RESTFul webservices with my AppEngine app.
I have looked over Stackoverflow for references to RESTFul service frameworks that can be used with AppEngine for both web (GWT) and mobile (Android) clients. Although Restlet
seems to provide editions for AppEngine, GWT and Android, so far I've got it down to RestEasy
mostly due to this question.
There have been questions previously that discuss RESTFul frameworks but I don't think the comparisons apply well to this, now quite common, case. It would be helpful to hear experienced developers' views on the frameworks available for this set of platforms and merits versus demerits of each.
You might wish to consider using Google Cloud Endpoints, which was announced as a trusted tester feature for App Engine at Google I/O, and is now available to everyone. With Endpoints, you annotate simple Java (or Python) classes and methods to describe your API. For example, this is a simple class to get and retrieve a list of high scores from a Tic Tac Toe game:
@Api(name = "tictactoe")
public class ScoreEndpoint {
@ApiMethod(name = "scores.get")
public Score get(@Named("id") String id) {
PersistenceManager pm = getPersistenceManager();
Score score = pm.getObjectById(Score.class, id);
pm.close();
return score;
}
@ApiMethod(name = "scores.list")
public List<Score> list() {
PersistenceManager pm = getPersistenceManager();
Query query = pm.newQuery(Score.class);
return (List<Score>) pm.newQuery(query).execute();
}
}
Check out the documentation for more details on using Endpoints.
You can also watch several talks from Google I/O: