36 comments

[ 2.5 ms ] story [ 92.5 ms ] thread
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.
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.

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...

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.

I'm honestly not sure, I have no experience with Objective-C but just from reading I think you'll still need to write an Objective-C interface/wrapper for your C code before it can be interfaced with RubyMotion.

Edit: A discussion topic on the newsgroup about it: https://groups.google.com/d/msg/rubymotion/tn5p3g071OE/5jyJI... (you'll have to sign up I think)

While it is early days, it is worth mentioning (or at least taking note of) Ruboto: http://ruboto.org/

Between Ruboto and RubyMotion, I think there is a very real possibility that Ruby will become a significant player in the mobile space.

jballac, excellent point. If you post this as a comment on the page, we'll approve it ASAP, so that viewers from all origins will see it.
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.

buy a better monitor jj. Good point, we'll add an unstick on our todo list.
I really do need a monitor that can stand vertical. Wide screen monitors for reading text makes zero sense.
> 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.

(comment deleted)
Why not do a simple thing - when the user starts scrolling down, switch to a mini-version of the header.
It's not so much that the header is stuck there, it's that the logo hangs down further than the bar. While reading the post, several times I started reading a sentence only to see the middle of it and having to adjust the scrolling. Also, it breaks the space bar... I can't just read a page, hit space to get the next page of text. It forces me to scroll with my mouse. Very annoying.
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.
Well, there are folks who don't find Xcode or Objective-C beautiful and prefer using the command-line. A lot of folks, actually. :)
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.
You can still use XCode's interface builder and use Storyboards and XIBs with RubyMotion. It's not as nicely coupled as it is with Objective-C, but again, RubyMotion is in its infancy and evolving rapidly.
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.

I did. And by the way; irrelevant.
I would politely disagree. XCode is a beast of a program to learn and to maneuver, RubyMotion's command line interface is comparatively very simple with only a handful of commands. Coming from Ruby, it behaves like most things in that ecosystem, command line oriented and no IDEs, obviously if you're coming from XCode, it's going to feel foreign.

Further, I think learning Cocoa libraries in verbatim Objective-C is a only transient problem for the near-term. Efforts are already underway to abstract away some of that complexity but it's hard to be overly critical of a 5 week old project for not being mature.

are you kidding? XCode is not a pleasure to use at all. It's a horrible cluttered environment that makes programming a CHORE.
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).

The comparison was one of personal experience, we had the app written in PhoneGap prior to the release of RubyMotion, then rewrote it. The post just documents our impressions from both approaches.
Sorry, didn't mean to imply that your article was odd. Just, it seems odd to have that comparison made. Sort of like comparing a programming language to a framework if you will.
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.

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.

Well, I'm now a fan of Ruby; I learned it via RubyMotion :)
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?
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.

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.

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.

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.