
PhoneGap vs RubyMotion - jballanc
http://iconoclastlabs.com/cms/blog/posts/phonegap-vs-rubymotion
======
freehunter
One thing that really put me off about this article: the giant header that
scrolls with the page. Vertical real-estate is already limited on a wide-
screen monitor. I hate it when CNet does it, I hate it when news sites do it,
I hate it all around. I understand I might not be speaking for everyone, but a
nice thing would be an option to stick the header to the top. It could scroll
by default until you click a button, where it would lock to the top of the
screen.

As is, though, I find myself judging a site/article/company based on how many
elements of their site irritate me. And it's a giant header.

~~~
GantMan
buy a better monitor jj. Good point, we'll add an unstick on our todo list.

~~~
lloeki
> we'll add an unstick

 _NO_. This is just as bad. I loathe sites that require me to take action to
make browsing sane just as much as the current situation. Each site that does
this has its own way to make it unstick and I won't even bother looking 15
seconds how to hide that crap you're sticking through my optical nerve to read
some content I may or may not even be interested in.

 _Solution_ : show your header for a second or two, then roll it up, leaving
the bottom rounded part shown as a hint. If the user wants to show it again he
will reach for that middle rounded part, upon which you could react to a
hover, a click/tap and/or a drag. Why does it suck less? The animation builds
expectation and explains the behavior, while the hint explains how to take
action. Zero thought needed, and no friction to 100% content.

------
phamilton
Phonegap is useful when you want to get a quick and dirty one off application
launched. It lets your designers work in CSS which is very familiar territory.
Most one off apps are more informational than interactive (Think conference
schedule app) and phone gap is more than responsive enough. It supports enough
basic api calls to do simple things like take a picture and stuff and does it
well. Ruby Motion seems like what I wouid use for a stable long term code base
for a new application. The difference being the product. The small one offs
are usually supporting a bigger product (like a conference) and the long term
code base is a product itself.

------
gavingmiller
The article isn't necessarily a far comparison: PhoneGap is cross platform,
RubyMotion isn't. But it's nice to see someone holding up the different tools
against one another.

His conclusion is more than correct for PhoneGap: PhoneGap feels like half-
assing it.

~~~
evilduck
Disclaimer: I'm Matt, the other half of Iconoclast Labs.

That platform limitation of RubyMotion and the cross-platform nature of
PhoneGap is acknowledged multiple times in the post.

From a business perspective, the cross platform nature of PhoneGap may make it
a better choice for some projects but from our short comparison of the
PhoneGap version of the app deployed on both platforms, iOS appears more
promising* so that's why we chose to write a native version for iOS (plus,
coming from more of a Ruby/web background and having no Obj-C experience,
RubyMotion lowered the barrier to entry for that). It's been an interesting
learning experience for sure.

[*] [http://iconoclastlabs.com/cms/blog/posts/chatoms-app-
store-e...](http://iconoclastlabs.com/cms/blog/posts/chatoms-app-store-
earnings-report-month-1)

~~~
z92
Can I include a C source file in RubyMotion project, compile it, and call the
C functions directly from Ruby? That can be done easily with Obj-C.

I was looking for its answer for some time now. Our projects include a lot of
C code.

~~~
lrz
Yes, you can vendor pure C libraries and use their APIs in a RubyMotion
project (assuming the C interface is simple enough). Here is an example that
uses the OpenGL C APIs:
[https://github.com/HipByte/RubyMotionSamples/tree/master/Hel...](https://github.com/HipByte/RubyMotionSamples/tree/master/HelloGL)

------
anuraj
I can understand PhoneGap will be handy when requiring cross platform
compatibility and you are not a multi platform expert. The experience is
always going to be underwhelming. RubyMotion is much more ambiguous, on one
hand we have beautiful XCode and Objective-C environment which is a pleasure
to use, and then this command line monstrosity! And it do not save you from
learning cocoa libraries - So if you want to develop for iOS, try to use Apple
tools - period.

~~~
lrz
Well, there are folks who don't find Xcode or Objective-C beautiful and prefer
using the command-line. A lot of folks, actually. :)

~~~
anuraj
Well - try developing a pixel perfect app on command line and see! And by the
way Objective-C is the fastest growing language out there.

~~~
jballanc
In my experience, the text-editor/command-line path is the _only_ way to be
truly "pixel perfect". Visual tools can get you most of the way there, but it
seems you always inevitably have to touch the drawing code if you want true
accuracy.

Oh, and as for Objective-C being a fast growing language? The rise of
Objective-C is _directly_ tied to the rise of the iOS platform. If iOS had
been written in any other language, Objective-C would still be a mostly
forgotten language today.

------
programminggeek
Having just spent the weekend doing an iOS app in PhoneGap and jQuery Mobile,
I can say that PhoneGap can get you to the first 80% really fast and it can
look/feel native, but the devil is in the details and the last 20% is going to
take an extra 80% for sure.

Native vs HTML/PhoneGap is about tradeoffs. With a little bit more experience
I'll be able to easily ship a working app in a weekend using PhoneGap, but
there are plenty of use cases where native would be a much better way to go
(games, photo filter apps, etc.)

It's not about what is better in all cases, it's about what is better for your
project.

------
brodney
I don't understand the apparent disdain here for phonegap. I'm currently
working on a freelance project to convert a blackberry app to a phonegap app.
Everything they want to do they can do using phonegap. I don't feel held back
or like I'm half-assing it. I have access to CSS for, in my opinion, easier UX
designing, and jQuery for things like posting or modal dialogs. Why aren't
more people excited about developing once and it working on multiple
platforms?

~~~
eddieroger
I think it comes back to the idea of "jack of all trades, master of none." No
matter what PhoneGap does, it will never do everything superbly, and sometimes
(often, even, I'd say) the trade-off isn't worth it.

There's also probably an ego play, too. I see the "Objective-C isn't that
hard. Learn it." argument a lot, but it does have a steep learning curve. For
one, it's syntax is confusing if you don't recognize the brackets and
messaging. Second, it's a lot closer to C than something like Ruby or Python,
so you have to learn about types and memory management.

~~~
brodney
I thought it might be the jack of all trades issue. I find phonegap to be a
great framework when it is appropriate to use. In the project I mentioned, it
fits the client's needs perfectly. I wouldn't use it to develop an app that
needs tighter access to the api or hardware than what phonegap offers. I have
another project using audio units - phonegap would be a bad choice there.

It's a mistake to compare these frameworks to native apps, not that you did
but several posts are. They are different, and that's good. It's like
complaining that C isn't object oriented. Find the right hammer for your nail.

~~~
GantMan
That's the attraction to phonegap, but what happens when your "nail" changes?
Your client might ask for a small feature that the API doesn't support, which
renders your entire solution useless, or cumbersome.

One of the points in the article is that the second you want something
phonegap doesn't provide, you're stuck back-peddling, or over-engineering your
fix. We've already come across such a situation with one of our upcoming
projects that requires camera overlays.

Ultimately, it's important to compare options, whether they be frameworks,
native, or toolchains. They're all avenues that need to stand their ground
against other avenues.

------
jasonlotito
Seems kind of an odd comparison to make. I see RubyMotion more in competition
with something like Titanium. The question then becomes whether you want to
use JavaScript or Ruby, as well as the support.

Personally, I just bit the bullet and spent time learning Obj-C, and found it
to be much more pleasurable (especially when you don't limit yourself to just
using XCode).

~~~
cnp
Titanium uses it's own methods and translates that code into Obj-C (you can
actually see the * incredibly insane* trans-source when you build the app) --
RubyMotion is a direct interface with Cocoa and Obj-C. If you know Obj-C you
can immediately start experimenting with RubyMotion --comfortably-- and if you
know Ruby and can "read" Obj-C you can immediately pick up the iOS cookbook
and get started, like the authors did. Think of it as a dialect, similar to
CoffeeScript, where all the same rules apply, but things are just... better.
Having zero Obj-C experience and, I admit, no desire to go into the realms of
byte-sized memory management, I avoided it for a long time, but after just a
few weeks with RM I feel like I have a very strong grasp on both Ruby and
Obj-C, and can read and write both interchangeably, including interfacing with
Storyboards and Interface Builder. Two languages for the price of one, IMO,
and that was well worth the $150 dollars I paid, aside from any products that
I may release with the toolchain.

But yeah, in short: there's no comparison between Titanium and RM.

~~~
jasonlotito
Not a fan of Ruby (which pretty much nails RM's coffin for me), so really
can't comment. You appear a fan of Ruby, so I take what you say with a grain
of salt.

> there's no comparison between Titanium and RM.

Well, there is. As much, I guess, as there is between PhoneGap and RM. I
really just saw RM and Titanium having more in common then what PhoneGap had
to offer, and saw the comparison as a bit odd. PhoneGap's goals are different
then RM or Titanium. That's all I really meant.

~~~
cnp
Well, I'm now a fan of Ruby; I learned it via RubyMotion :)

------
bryanjclark
I'm still waiting to see _one_ app made in PhoneGap that doesn't look like
complete rubbish.

For my nickel, I believe your best bet is to either make a native app, or a
mobile website. These "cross-platform" tools just make apps that feel like
junk.

~~~
phamilton
[http://itunes.apple.com/us/app/michigan-danger-on-our-
roads/...](http://itunes.apple.com/us/app/michigan-danger-on-our-
roads/id465543077?mt=8)

