Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 889
Hemanth Avatar asked Nov 02 '10 07:11

Hemanth


People also ask

Can Ruby on Rails be used for mobile apps?

Ruby on Rails gives a competitive edge for mobile solutions for Android and iOS. In RoR, Ruby is the language of coding or the programming language and Rails is a framework that provides default structures for a database, a web service, and web pages and used for creating the web or mobile application.

Is Ruby good for app development?

Ruby developers love it because it's very easy to use and understand, thanks to its simple syntax that it's as close as English as a programming language can get. This makes it easier to create applications with Ruby, which is why it's also especially useful to quickly develop prototypes and proof of concepts.

Can Ruby be used in Android?

Ruby on Rails was designed to create performative apps for both iOS and Android apps.

Which apps use Ruby on Rails?

Companies like SlideShare, Airbnb, CrunchBase, Bloomberg, Dribble, Shopify, and GitHub (to name a few) have trusted Ruby on Rails and used the framework in their applications. Here's a roundup of the top 28 Ruby on Rails companies in 2022.


2 Answers

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.

like image 132
rwilliams Avatar answered Oct 12 '22 02:10

rwilliams


I've created an example rails / ember.js App that is exported with Phonegap. It uses just the usual MVC architecture of a Rails and an Ember.js App. Maybe you will find it useful. It also implements token authentication based on ember-auth and several OAuth strategies.

Currently in de the devel branch: https://github.com/joscas/base_app/tree/devel

Heroku deploy: https://starter-app-staging.herokuapp.com (the desktop version)

Exported with phonegap-rails gem (of which I'm also the author) for assets, fix paths etc.

like image 44
joscas Avatar answered Oct 12 '22 02:10

joscas