Can we use Ruby on Rails to develop a mobile app?

Hemanth picture Hemanth · Nov 2, 2010 · Viewed 80.8k times · Source

Since Rails uses MVC architecture. I was wondering that if we can use Rails to develop a mobile app or any web app.

Out of MVC the 'M' and 'C' won't change to develop the mobile app right?
I mean the models and controllers will remain the same.

Only the view portion should be changed such that, instead of using html.erb files I want Java or Android SDK or whatever, to provide the UI for the mobile user.

Can someone enlighten me on this perspective?

Also I have been hearing about jRuby does it come into play for our mobile app development requirement?

Answer

rwilliams picture rwilliams · Nov 2, 2010

The answer to this question is going to depend on how you want to deploy this app. Do you want it running completely on the phone or can it be a web app disguised as an iphone/android app?

For the native app solution I'd checkout the Rhodes Framework. It's not RoR but you'll see that it's an MVC framework that feels similar. This will allow you to build native iphone/android apps using Ruby.

For the 2nd option, web app disguised as a mobile app, I'd recommend Sencha Touch. Sencha has done an amazing job mimicking the look and feel of native iphone/android apps with their Javascript library. With this solution it would be just like any other web app though it's targeted for android and iphone via it's UI.