RestKit in android?

狂风中的少年 提交于 2019-12-09 17:51:54

问题


I have used restkit framework in ios. Which is very powerful and provides features like caching and all. I am looking whether a similar framework is available in android?

I came across a framework called restlet. But didnt find any samples to work with.

Is there any frameworks out there for the same, for caching data from rest services? Also could some one direct me to good tutorials for restlet in android?

Thanks


回答1:


In addition, there is this first application tutorial covering Restlet edition for Android: http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application




回答2:


There is a sample to work :

http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application

It should solve your problem




回答3:


I wouldn't call it a framework, but there is a library called Robospice that supports Caching Rest Calls.

Here is the description they posted in their webpage:

RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules




回答4:


Give Retrofit a shot. It's easy with plenty of customization available.

It also has OkHttp that can pair with it.

Also check out this SO link. It compares Retrofit to Android AsyncTasks and Volley. As far as speed goes, Retrofit wins hands down.




回答5:


I think the RestTemplate included in Spring for Android is a good solution: http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html

There is a book that provides a tutorial: http://www.packtpub.com/spring-for-android-starter/book

Unlike Restkit which comes with backed in Core Data support, you would still have to find a separate solution if you want to plug your Android Spring REST client into your local sqlite db. It should be possible to use something like http://greendao-orm.com/ in connection with the Spring REST client.



来源:https://stackoverflow.com/questions/7743747/restkit-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!