简体   繁体   English

Android和Ruby on Rails-对象映射

[英]Android and Ruby on Rails - Object Mapping

I have a Ruby on Rails web application, and I'm currently working on an Android application. 我有一个Ruby on Rails网络应用程序,目前正在开发一个Android应用程序。 I would like for the android application to make calls to the Rails application and make local objects from the results. 我想让android应用程序调用Rails应用程序并从结果中创建本地对象。

For iOS, there is a framework called RestKit that does a great job mapping Objective-C objects to remote Ruby on Rails objects. 对于iOS,有一个名为RestKit的框架,可以很好地将Objective-C对象映射到远程Ruby on Rails对象。 What are the alternatives for Android? Android有哪些替代方案?

Are there any great examples or blogs out there that sync up Android and Ruby on Rails? 有没有很好的例子或博客可以同步Android和Ruby on Rails?

Spring for android http://www.springsource.org/spring-android has feature RestClient http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html 适用于Android的Spring http://www.springsource.org/spring-android具有RestClient功能http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html

Third party object mappers need to be set there, I recommend google-gson. 需要在此处设置第三方对象映射器,我建议使用google-gson。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM