
Using RubyMotion to Build JavaScript Based iOS Apps - jballanc
http://www.willprater.me/blog/2012/08/21/using-rubymotion-to-build-javaScript-based-ios-apps
======
jcromartie
Sorry, Ruby fans. There is absolutely nothing special about this. It's a basic
iOS app that just bootstraps Cordova.

There are no Ruby idioms in use that save code over the Objective-C
implementation. There are no blocks, map, inject, hash or array literals,
etc.. Sure, you don't have to write a .h file.

The Ruby code here could be translated line-for-line into Objective-C and
built with the standard toolchain, without _another_ $200 toolchain. And guess
what? You _still_ need to know the Objective-C API to write the app delegate
and view controllers.

RubyMotion makes no sense here.

~~~
wprater
There was no attempt made to use Ruby idioms in the article. I think you're
missing the point. It was merely an example how one can use alternate build
tools, while extending their JavaScript or Cordova based app using Ruby over
Objective-C. Not everyone is a fan of Xcode nor Obj-C. Lots of education about
the tools was included to help one get on their way; the intention was not to
be craft a reason as to why Ruby idioms can make a developer more productive.

RubyMotion does make sense here, if your goals are as described in the
article.

------
programminggeek
I like PhoneGap, but I am not really sure why you would do this with
RubyMotion when for most PhoneGap apps, you really don't need to go much
outside of what there are already plugins for. In my experience, getting a
plugin working in Obj-C is not terrible.

~~~
wprater
A few reasons:

There is no build system in PhoneGap, just instructions on how to get it build
with Xcode. Using the RubyMotion build tools will allow you to work around
this, all you'd really need is the Rakefile in this case, no extra Ruby files.

It's agreed, that most may not need to write (or alter) Plugins for PhoneGap,
but if you did, and if you'd prefer to write in Ruby, this article may be
helpful!

Or maybe you just want to tinker around.

~~~
endemic
Hmm, I thought that v.2 shipped with some build scripts, so theoretically you
wouldn't have to open Xcode, just do everything via command line.

------
ndonnellan
I haven't seen many articles mention Titanium (appcelerator) as an alternative
to RubyMotion; you could skip the ruby step and just start in Javascript.
Also, their documentation and tutorial videos are substantial and well done.

~~~
jonny_eh
Titanium is a noble effort but you're still beholden to Appcelerator in terms
of what API functionality is exposed, unless you want to write your own
plugins.

------
jpincheira
I really thought this was something like writing everything in JS instead of
Ruby and/or Objective-C. The title is kind of misleading. This is just Cordova
but with RubyMotion. Bummer.

