from Hacker News

Show HN: Our first iPhone app, built entirely in JavaScript

by yosho on 2/14/12, 11:34 PM with 51 comments

  • by stevenou on 2/15/12, 12:15 AM

    Hi, I'm the CTO for RAVN. When we decided to jump into the mobile dev game no one in our company had any experience with Object C or Android dev. We knew we wanted an iPhone app for sure, and probably an Android app eventually. I had taken a brief look at Objective C previously, and coming from Ruby/Rails, it looked less than trivial (memory management?! I hadn't done that in 10 years). I had heard about frameworks that would allow us to use JavaScript to write our app, and also allow for cross-platform development, so I started researching.

    I looked at PhoneGap and Titanium primarily. We ended up going with Titanium for a few reasons:

    - As you may or may not know, PhoneGap works by creating a sort of Safari "wrapper" that lets you write your app in HTML5 and JS. But the performance is crappy relative to native rendering. Titanium also used to work the same way, but more recently it actually compiles code written in JavaScript to native Obj C and Java. Clearly the benefit is speed.

    - Even though Titanium only supports iOS and Android, we didn't really plan on ever developing for other platforms (e.g. Windows Phone, BlackBerry, webOS).

    If you're looking into developing a mobile app, I would recommend taking a look at Titanium. To be fair, I had to write a little Obj C to hack geofencing functionality into Titanium (if you're interested in that: http://stevenou.com/post/17623116547/how-to-hack-geofencing-...).

    There were lots of pros and cons to using Titanium and I'd be happy to answer any questions.

  • by d2ncal on 2/15/12, 3:06 AM

    I am the founder of http://theicebreak.com

    We have built our app ( Icebreak for Couples - http://itunes.apple.com/app/id476063944 ) using Titanium.

    When we started building it, Titanium was very very buggy. It has since improved, but still has a lot of really basic stuff that is broken. Their forums have a lot of questions that have been unanswered for over an year.

    Our reason for picking Titanium was basically to have an app that is just like a native app on both iPhone and Android without writing the code twice.

    We have found out that porting a Titanium app to Android is taking a ton of effort, lot more than we originally thought. I would be curious to hear what the RAVN team has to say regarding their Android version.

    Its just not as cross-platform as we thought :(. I would be extremely careful before picking it in the future.

    Basically, if you build native apps:

    Native App: iPhone=1X, Android=1X. If you want both Android and iPhone: 2X

    Titanium App: iPhone=2X,Porting to Android: 0.7X. Total effort: 2.7X

    Native Wins.

  • by gpmcadam on 2/15/12, 12:03 AM

    Care to expand on the "built entirely in JavaScript" part? Sounds interesting.
  • by flixic on 2/15/12, 12:04 AM

    What framework did you use?
  • by draggnar on 2/15/12, 12:51 AM

    The landing page is fantastic. Super simple initially, more info if I want it. I wish the features section was more visual.
  • by bwm on 2/15/12, 1:24 AM

    I'm pretty impressed with what you can achieve by running JS in a WebView, that said, it still is not as responsive as a native app. This is one of the better attempts I've seen though at bridging the gap between HTML5 and native, perhaps it just needs another year? keep up the good work!
  • by romefort on 2/15/12, 4:45 AM

    The app looks great, congrats on that. The thing that bothers me though is that it posts stuff on my FB timeline without my approval first. This does not sound like a good practice.
  • by joezhou on 2/15/12, 12:54 AM

    Though with titanium and phonegap you still cannot tap into the full capacity of the phone.
  • by paisible on 2/15/12, 1:30 AM

    Is there any way we can add our own events ?