我在ios中使用过restkit框架。它非常强大,并提供缓存等功能。我正在寻找类似的框架在android中是否可用?
我遇到了一个名为restlet的框架。但是没有找到任何可以使用的样本。
有没有相同的框架,用于缓存来自休息服务的数据?还有人可以指导我在 android 中找到关于 restlet 的好教程吗?
谢谢
此外,还有第一个涵盖 Android 版 Restlet 的应用教程: http ://restlet.org/learn/guide/2.2/introduction/first-steps/first-application
有一个样本可以工作:
http://restlet.org/learn/guide/2.2/introduction/first-steps/first-application
它应该可以解决您的问题
我不会称它为框架,但有一个名为Robospice的库支持缓存休息调用。
以下是他们在网页上发布的描述:
RoboSpice 是一个模块化的 android 库,可以轻松编写异步长时间运行的任务。它专门处理网络请求,支持缓存并使用扩展模块提供开箱即用的 REST 请求
我认为 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 客户端连接。