Android - Basic CRUD (REST/RPC client) to remote server
<p>There are lot of discussion about REST client implementation in android, based on the talk at GoogleIO 2010, by Virgil Dobjanschi. My requirement may not necessarily involved, as I have some freedom to choose the configuration.</p>

<ol>
<li>I only target tablets</li>
<li>configuration changes can be prevented if no other easy way (fix at Landscape mode etc)</li>
</ol>

<p>I am trying to achieve.</p>

<ol>
<li>Basic CRUD operation to my server (JSON RPC/ REST). Basically mimic an ajax request from android app (no webview, need native app)</li>
</ol>

<p>Based on the above mentioned talk, and some reading I see these options.</p>

<ol>
<li>Implement any of the 3 mentioned in the Google IO talk</li>
<li>Especially, the last pattern may be more suitable as I don't care much of caching. But not sure how "real time" is sync implementation.</li>
<li>Use HTTP request in AsyncTask. Simplest, but need to avoid re-sending request during change in device configuration (orientation change etc). Even if I fix at one orientation, recreation of activity still happens. So need to handle it elegantly. </li>
<li>Use service to handle http request. So far, it say use service for long ruiing request. Not sure whether it is a good approach for simple GET/POST/PUt requests. </li>
</ol>

<p>Please share your experience on what could be the best way.</p>

<h2>EDIT:</h2>

<p>Further search reveal some nice posts and code samples.</p>

<ol>
<li><a href="http://static.springsource.org/spring-android/docs/1.0.x/reference/html/index.html" rel="nofollow">Spring for Android</a> </li>
<li><a href="https://github.com/octo-online/robospice/wiki/Understand-the-basics-of-RoboSpice-in-30-seconds" rel="nofollow">RoboSpice</a></li>
<li><a href="http://neilgoodman.net/2011/12/26/modern-techniques-for-implementing-rest-clients-on-android-4-0-and-below-part-1/" rel="nofollow">Using Loader</a></li>
<li><a href="http://neilgoodman.net/2012/01/01/modern-techniques-for-implementing-rest-clients-on-android-4-0-and-below-part-2/" rel="nofollow">Using service</a></li>
</ol>

<p>I am thinking about doing it through service. Please comment your suggestions.</p>
