问题描述
我想问一下在这个问题上我有一些建议。我的工作是与红宝石制作上轨(连同html.slim,CSS,angular.js)在网站上。
I would like to ask for some advice on this issue I am having. I am working on a website that is made with ruby on rails (along with html.slim, css, angular.js).
我想创建一个Android(和,如有可能,还iOS的/ Windows phone)系统的应用程序访问此网站的一部分。
I would like to create an Android (and, if possible also iOS/Windows Phone) app to access a part of this website.
该网站确实没有什么比使一些API调用到服务器更多,它真的很轻,所以我觉得我不需要做本机应用程序。我想使这个应用程序尽可能以最快,最简单的方法。我以为我会能够使转换使用PhoneGap的网站,但如果只用HTML,CSS和JS做,不也与Ruby on Rails的这会工作。我唯一需要的是存储设备上的小串(网站存储的cookie),然后做一些简单的API调用。
The website does nothing more than making some api calls to a server and it's really light, so I think that I don't need to make a native app. I would like to make this app in the fastest and easiest way possible. I thought that I would be able to make convert the site using Phonegap, but this would work if it was made only with html,css and js, not also with ruby on rails. The only thing I need is to store a small string on the device (the website stores a cookie) and then to make a few simple API calls.
感谢您的任何意见在这 - 不高明 - 问题。
Thank you for any advice on this - not so clever - question.
再见!
推荐答案
也许(如果你需要为移动平台真正简单的应用程序),你应该建立内部应用谁将会从您的公开接收HTML数据与浏览器对象的Android / iOS应用网站并显示用户。你只需要在你的Rails应用程序中创建的移动布局。
Maybe (if you need real simple app for mobile platforms) you should create Android/iOS app with browser object inside app who will be receiving html data from your public website and show it for user. You just need to create mobile layouts in your rails application.
优点:
- 您可以真正快速创建这个应用程序;
- 易于更新;
- 请不要需要更新的应用程序,如果事情一般Web应用程序的布局或逻辑改变。
- 当您移动创建的布局,他们会为您的应用和谁不使用你的应用程序的移动设备的工作。
缺点:
- 这不是典型应用,它只是你的应用程序内浏览器。
这不是开始一个坏的解决方案。对于大多数网站和项目也就足够了。
It is not a bad solution for start. For most sites, and projects it will be enough.
有关轨道和移动布局轨道您可以在这里找到更多信息:
More information about rails and mobile layouts for rails you can find here:http://railscasts.com/episodes/199-mobile-devices
例的样子与浏览器(web视图)对象Android应用:
Example how looks like android app with browser (Webview) object:http://www.mkyong.com/android/android-webview-example/https://developer.chrome.com/multidevice/webview/gettingstarted
我很抱歉,如果这不是你要找的答案。
I'm sorry if this is not the answer you were looking for.
这篇关于从Ruby on Rails的网站/ web应用到PhoneGap的Android应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!