Reputation: 4403
totally PhoneGap newbie here, but looking to learn the basics of how to interact with a Rails 3 web app using Phonegap.
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.
Upvotes: 3
Views: 6939
Reputation: 2750
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.
A client-side MVC framework like Backbone is useful in this situation.
Read PhoneGap's Get Started Guide.
Upvotes: 2
Reputation: 4083
I'm currently working on a phonegap app integrating with .net. I do all of my interaction with my .net webservice by using xui's xhr call that return/submit either json or xml data.
Refer to the following link to read more on xui and xhr http://xuijs.com/docs/xhr
Upvotes: 0