We have had good success with PhoneGap (also known as Cordova). However, you will need to write a client app that is written in a framework like Backbone, Angular, Ember. I don't know much about RHOMobile but maybe it is a competitor to PhoneGap/Cordova?
As far as back-end, I actually do recommend you create a versioned API that operates at distinct route from your main web-based app. There are good reasons to do this -- specifically, a versioned API will operate at a url like /api/v1/. This will mean that in the future if you want to change the output of the API, you can do so by creating a new API version number (/api/v2) and still have your old mobile clients use the old API (which you generally leave-in-place to support older clients rather than replace) Another good reason to create a versioned API instead of using existing Rails endpoints is that it actually forces you to move your domain logic out of your controllers. You controllers-- both your Rails controller and the API controllers -- should be really, really lean and never contain any domain logic (business logic). If you have a lot of IF statements in your controllers, you probably have too much domain logic in the controllers. Writing more controllers, although it does have an added cost of more controllers to maintain, actually can help you abstract the domain logic into context objects or model objects where they belong. This is because if you have two controllers with repeated code in them it becomes very obvious that that repeated code is domain logic and should be encapsulated into either a model, service object, or DCI object. Doing it this way is a little more work but in the long run you end up with better product. Also, ActiveModel serializers (https://github.com/rails-api/active_model_serializers) have come a long way in the last year or so, and now do some really fancy stuff like root element control, arrays, embedded associations, and side-loading data. If you aren't familiar with what these are, learn them before getting started as they will affect the architecture of your API. -Jason On Aug 24, 2014, at 12:08 PM, and...@benjamin.dk wrote: > Hey guys, > > I am about to develop my first mobile app with the same function of a website > I have developed in rails. So I have a few questions: > > 1. My plan is to create an API to the website and build the app using that > API to my website. In your experience is that a good solution? > > 2. Whats the best option, use a cross-platform framework like > http://rhomobile.com/ ? something like rubymotion for iOS and try to find > another framework for android? or actually just do it on the given SDK? > > 3. Should I not even worry about developing a website and go straight ahead > with the app leaving the API idea behind? > > 4. Any other suggestions? > > all the best, > > Andre > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/55f01140-009f-4010-8ff6-4d209e9741c4%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CD733082-4717-49C7-9D1C-2B0B3808597A%40datatravels.com. For more options, visit https://groups.google.com/d/optout.