TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What's the quickest way to port a Rails app to Android?

10 点作者 slaxman超过 11 年前
We have a Ruby on Rails based web application. We have been getting a lot of requests for an android app from our users specifically so that they can access some data on the move even without an internet connection. What would the quickest way be?<p>PS: I am not looking to write the code from scratch. I am want to optimize the time to release the android app.

5 条评论

andrewljohnson超过 11 年前
For fastest time to market, optimize the HTML&#x2F;CSS&#x2F;JavaScript to display well in a mobile browser. Detect if they are coming from mobile (requests headers like the user-agent tell you, or just optimize on screen size), and send down mobile pages. Many websites are designed with this in mind from the beginning, and services like Weebly and WPEngine will provide this in their form-built websites.<p>Otherwise, if your back-end has a usable API, then something like PhoneGap will be faster than writing a native Android&#x2F;Java app.<p>Our marketing website takes the first approach, for our core app we write native Java.
评论 #6707832 未加载
评论 #6707875 未加载
th0br0超过 11 年前
Given that you&#x27;re actually needing offline availability, the easiest way (as long as you&#x27;ve already got a mobile-friendly design) would probably be to deploy special wrappers for your DAOs (API classes, whatever), that perform the necessary caching to allow for it.<p>PhoneGap seems only interesting if you wish to commit the cached changes (or is offline = read-only?) upon regaining of connectivity.
mbesto超过 11 年前
Is your site already mobile friendly? If so, I suspect you could do a very quick and dirty HTML wrapper Android app that is simply a web browser.<p>Note - to any naysayers of this technique, getting an app out in the app store in this case is simply another distribution technique, even if the site is 100% identical to the web version.
评论 #6708980 未加载
zbruhnke超过 11 年前
since its rails I would think it should be easy for you to create an API and then use those endpoints to retrieve data from the rails app and into the Android app.<p>This would mean a small amount of code on the Android side and some augmentation to how your rails app works, but its likely that your rails application already works alot like an API even if you didn&#x27;t quite plan it that way by the nature of how rails lays things out for you.
评论 #6707822 未加载
programminggeek超过 11 年前
Learn Java. Write the app. Submit to play store.
评论 #6719001 未加载
评论 #6708978 未加载