Android 中的 RestKit?
我在ios中使用了 restkit 框架。它非常强大,提供缓存等功能。我正在寻找类似的框架是否可以在android中使用?
我遇到了一个名为 restlet 的框架。但没有找到任何可以使用的样本。
是否有任何框架可以实现相同的目的,用于缓存来自休息服务的数据?另外有人可以指导我找到有关 android 中的 Restlet 的好教程吗?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
此外,还有第一个涵盖 Android 版 Restlet 版本的应用程序教程:
http://restlet.org/learn/guide/2.2/简介/第一步/首次应用
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
有一个示例可以使用:
http://restlet.org/ learn/guide/2.2/introduction/first-steps/first-application
它应该可以解决您的问题
There is a sample to work :
http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application
It should solve your problem
我不会称其为框架,但有一个名为 Robospice 的库,支持缓存休息调用。
以下是他们在网页上发布的描述:
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:
尝试改造。这很容易,有大量可用的定制。
它还具有可以与其配对的 OkHttp 。
另请查看此SO链接。它将
Retrofit
与Android AsyncTasks
和Volley
进行了比较。就速度而言,Retrofit
轻而易举地获胜。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
toAndroid AsyncTasks
andVolley
. As far as speed goes,Retrofit
wins hands down.我认为 Spring for Android 中包含的 RestTemplate 是一个很好的解决方案: http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html
有一本书提供了教程:http://www.packtpub.com/spring-for-android-starter/book
与具有 Core Data 支持的 Restkit 不同,如果您想将 Android Spring REST 客户端插入本地 sqlite 数据库,您仍然需要找到单独的解决方案。应该可以将 http://greendao-orm.com/ 与 Spring REST 结合使用客户。
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.