Solution 1:

I am the author of the RESTProvider. Still very early stage so I would not recommend to use it in production. I have been using it on several projects which are in production but I adapted most the code to specific needs. I will try to get a public stable API by the end of the year.

In regards to reworking the API, I would suggest the following:

  1. Use GZip compression
  2. Use ETags for caching
  3. Use standards with no modification (I saw cases where the naming changed from oauth_token to my_token which makes most library useless without modification) - OAuth/REST
  4. Use creation/modified timestamp and remote ids for all objects in order to enable caching client side (SQLite conflict clauses): {"myobject": {"createdAt": xxxx, "rid": "hashvalue"}} 4a. Use a good way to identify the object returned for user/activity/application: opensocial uses "application id" + "user id" + "activity id"
  5. Prefer JSON over XML
  6. Prefer simplicity (lowest depth possible)
  7. Return the full object with the one to many relationship within that object: {"parent":.... "has": {"full object not just the ID"} }
  8. Don't return IDs only ( "category": [ 2,3,4] should be "category": [{"name": "testing", "id": 2},{"name": "production", "id": 3 }} )
  9. Consider each call to be independent of each other (i.e. I should have enough information for call http://test.com/object.json to populate my views)

For documentation: 1. provide test servers 2. provide cUrl for testing 3. provide sample scripts in java/php/ruby etc...

That s all I can think for now. I might add ontop of this as I come with more suggestion.

Solution 2:

I'd recommend taking a look at RestKit for iOS

  • High performance, threaded network layer with a simple API for request/responses
  • Object mapping system for mapping remote payloads into local objects declaratively (including relationships)
  • Integration with Core Data for providing a fast local cache of remote data with synchronization capabilities
  • Support for generating a seed database from a series of JSON payloads
  • Specific support for integrating with Ruby on Rails backends (RKRailsRouter)
  • Apache licensed
  • Used in production in a number of excellent apps (i.e. Gate Guru)

Solution 3:

Just to add to Spring RestTemplate choice. Here is link for SSL https calls. Hope this helps others. Was looking for this solution a long time.

http://www.makeurownrules.com/secure-rest-web-service-mobile-application-android.html