jump to navigation

PhoneGap vs. Titanium from n00b eyes October 28, 2009

Posted by headwinds in Random.
trackback

pendragon developer

I admit it – I’m a n00b when it comes to mobile development. I have experimented with Android’s Java and Objective C but I’ve come to realize that what I really need is something simple that will translate easily from the web to mobile. I also need simple, well-written getting started tutorials to make this transition even easier.

In most of my posts, I point to Flash as my weapon of choice. Its my Excalibur. But then again I’m no pendragon; I can’t pick and choose my technologies. I’m somewhere in the middle of the pack of dragon developers who require a larger arsenal depending where they need to stick their media. Don’t get us confused with the other jacks out there. We aspire to be specialists even gurus in a few languages and command them to do our bidding. For me, its all about the speed to prototype and a decent level of control over the media.

For this test to compare frameworks, my goal is to link together 3 html pages with a mixture of text, images, and interaction. I want to build an iPhone app in the simulator without an actual iPhone nor developer license.

PHONEGAP

I approached Phonegap first which now slants my take on Titantium because it took out most of my hair during this process. It helped me learn to how to think about html/css/javascript for mobile, and this made diving in Titantium easier.

After downloading and opening the PhoneGap project in XCode, I mainly struggled with the xcode interface itself so I can’t really fault phonegap for my not being comfortable with its in and outs. For instance, I could easily edit the html but it took me a long time to figure out how to add an image to my project. I also attempted to manually rename the PhoneGap project to my own project name and this caused havoc [specifically I got a weird pathing error to a missing configure folder] and I had to rename it back to get it to compile properly.

I think most of my problems could be cleared up if this tutorial was better though. In fact, because they have a wiki system, I (or you) should consider writing one.

Getting started with phonegap and iPhone

TITANIUM

For Titanium, I watched a few videos on their site [ youtube also has decent Phonegap videos] and then downloaded and installed their Titantium Developer tool for the Mac which allowed me to configure my iPhone app without even touching XCode!

Next, instead of wrestling with XCode, I decided to open a familiar html editor — Dreamweaver — and edit the index.html in this environment. Again, without using XCode, I created an images folder and linked my html to an image in that folder. I returned to the Titanium Developer and launched the app. I saw my html page and the image [ I never did get the image to appear in Phonegap but that's xCode's fault I'm sure]. From there, it was relatively easy to create another html page as they include an about.html to reach my goal of three html pages with images and some hyperlinking interactivity.

Getting started with titanium and iPhone

CONCLUSION

Phonegap supports Android, iPhone, and Blacberry while Titanium supports Android and iPhone. This difference doesn’t really matter to me as I’m currently focusing on iPhone and Android. If I write standards compliant html/javascript/css as my base, I should be able to an create app that works within any platform and it would then be a matter of learning the individual hooks. The underlining html/css/javascript should then in theory be web friendly too so that one could that work and create things like facebook pages. Its a little bizarre to be thinking about the mobile first then the web.

I’d like to see both Phonegap and Titantium add a big quick link to their iphone development getting started pages on their home page as I had trouble finding them initially. I would like to see Phonegap write their own official guide to getting started separate from their wiki page as much as I love wikis, it needs an authority voice.

For your next mobile project, look at what your app needs to do and consider using html/javascript/css. One might consider the following workflow but I’ll jump straight to steps 2/3 :-D

1. create a prototype that works in a web browser
2. hook the prototype into a framework like phonegap or titanium in an iphone simulator
3. test the app on the actual device

I think I wanted PhoneGap to be a no brainer as it was recommended to me by friends. Right now, after about only 3 hours using each platform, I will have to recommend Titanium as I simply found it easier to get started with but I don’t know yet how it might limit me down the road.

* UPDATE *
Jesse MacFadyen has graciously provided the desired iPhone Phonegap tutorial. I’ve haven’t stopped following the Phonegap mailing list, and am continually impressed by their progress. I would now recommend giving both Phonegap and Titanium a shot and see which one best suits your needs.

Comments»

1. iPad “It shouldn’t feel like a computer” :: RickHap - February 7, 2010

[...] PhoneGap vs. Titanium from n00b eyes [...]

2. jfroom - February 18, 2010

thanks for the write-up

3. Rick - June 8, 2010

I’ve used phonegap for my iPhone and iPad apps – am about to pop over to youtube to look at Titanium clips.

Just to point out, I use Coda to do my phonegap apps. You can setup phonegaps ‘www’ folder as a site, then just edit away. If you’ve got MAMP, you can get it setup and test it locally (or even on your iphone with mobile safari pointed at your macs ip address).

Just basically saying that you dont have to use xcode at all with phonegap. The only thing I’ve done in xcode is change the name (not fun!) and add admob support (youtube video tutorial helps!)

4. Bill - September 16, 2010

titanium will also let you write apple,linux,and windows/gui applications using html, javascript, css and if you want php, python,ruby. preety awesome if i say so myself. I think they put a small webserver in code and php to make it standalone. The also have apis to let you write files.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.