开发者

Best REST Client Framework/Utility on Android [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but 开发者_StackOverflow社区this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I'm about to build an Android application that will use a RESTful Web Service. I don't want to write the REST client by myself, as I want it to be as effective and stable as possible (this is the first time I'm using REST).

Are there any (free) frameworks or utilities avaibale for Android/Java that I can use in my project?


Restlet is an excellent REST framework and has an Android edition.


Any HTTP Client library should be perfectly adequate to interact RESTfully with a web API. E.g. http://developer.android.com/reference/org/apache/http/client/HttpClient.html


try out Spring Android - is has very handy class RestTemplate.


I'm also looking for a SMALL solution for rest client on Android. After a quick comparison, I found:

  • Resting v0.7: resting-0.7-dev-release-android.jar - 1.3MB (all-in-one according to the doc)
  • Restlet v2.1.2: org.restlet.jar - 728KB (however must > 1MB after adding httpclient extention and json extention)
  • Spring for Android v1.0.1: spring-android-core-1.0.1.RELEASE.jar 113KB + spring-android-rest-template-1.0.1.RELEASE.jar 186KB + gson-2.2.3.jar 194KB = 493KB (without auth support, otherwise spring social will be a dependency)

Please correct me if any miss.


check out Resting - "Lightweight Java component to consume REST service and transform response into objects"

http://code.google.com/p/resting/

i haven't used it myself, but i plan to.

to go along with it, i'm searching for example source code to implement the best practices described in this google IO session. http://www.youtube.com/watch?v=xHXn3Kg2IQE

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜