PhoneGap和rails 3:如何与rails 3应用程序交互 [英] PhoneGap and rails 3: How to interact with a rails 3 app

查看:138
本文介绍了PhoneGap和rails 3:如何与rails 3应用程序交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完全PhoneGap新手上,但希望学习如何使用Phonegap与Rails 3网络应用程序交互的基础。

totally PhoneGap newbie here, but looking to learn the basics of how to interact with a Rails 3 web app using Phonegap.

我想在应用商店中发布我的Rails 3网络应用程序的轻量版作为iOS应用程序。我理解PhoneGap如何使用CSS / HTML / JS工作,但如何绑定我的Rails 3应用程序功能/ ruby​​代码。非常感谢任何洞察力。

I'm looking to release a lightweight version of my Rails 3 web app as an iOS app in the appstore. I understand how PhoneGap uses CSS/HTML/JS to work but how do I tie in my Rails 3 app functionality/ruby code. Thanks a lot for any insights.

推荐答案

您的生产轨道应用程序将生活在某些域。指定要在本地缓存并随应用程序分发的css,js和模板的清单。将XHR指向您的生产轨道应用程序,以获取数据并在本地显示所有内容,例如胡须

Your production rails app will live at some domain. Specify a manifest of css, js and templates to be cached locally and distributed with your app. Point your XHRs at your production rails app to fetch data and render everything locally with something like mustache.

一个客户端MVC框架,如 Backbone < a>

A client-side MVC framework like Backbone is useful in this situation.

阅读PhoneGap的入门指南

Read PhoneGap's Get Started Guide.

这篇关于PhoneGap和rails 3:如何与rails 3应用程序交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆