Ruby on Rails Web 应用程序到 iOS 或 Android 应用程序?
如果我要使用 Ruby on Rails 框架来构建 Web 应用程序,那么构建可以与 Web 应用程序对话和连接的移动应用程序 (iOS/Android) 的最佳途径是什么?
If I was to use the Ruby on Rails framework to build a web app what would be the best path for me to take to build a mobile application (iOS/ Android) that can speak and connect with the web application?
EG:twitter.com (DESKTOP) - twitter iOS 或 Android 应用.
EG: twitter.com (DESKTOP) - twitter iOS or Android app.
需要大量阅读.
您需要在 Rails 框架上构建 API 以与移动应用程序通信.以下是一些使用 Rails 创建 API 的好链接:
You will need to build an API on rails framework to communicate with an mobile application. Here are some good links for creating an API with rails:
http://railscasts.com/episodes/350-rest-api-versioninghttp://collectiveidea.com/blog/archives/2013/06/13/building-awesome-rails-apis-part-1/
我建议使用 Devise 进行身份验证,并使用他们的 authentication_token 来验证用户对 API 的网络请求.
I would suggest using Devise for authentication and using their authentication_token to validate users network requests to your API.
http://matteomelani.wordpress.com/2011/10/17/authentication-for-mobile-devices/
这里有一些有用的链接,我前段时间添加了书签以提供帮助.
Here are some helpful links that I bookmarked awhile ago to help.
http://pnhoang.tumblr.com/post/24160454924/build-a-rails-backend-api-for-an-iphone-clienthttp://www.takeofflabs.com/posts/8-Rails-and-iOS-a-sample-starting-setuphttps://devcenter.heroku.com/articles/ios-photo-sharing-geo-location-servicehttp://jessewolgamott.com/blog/2012/01/19/the-one-with-a-json-api-login-using-devise/
祝你好运