share
Stack OverflowComparison between Corona, Phonegap, Titanium
[+310] [14] Mickey Shine
[2009-09-27 01:46:50]
[ iphone android html mobile-website ]
[ http://stackoverflow.com/questions/1482586/comparison-between-corona-phonegap-titanium ]

I am a web developer and I want to move my web products to iPhone. One of the products is like Google Maps: show map on the phone screen, you can drag or resize the map and view some information that we add to the map.

I know there are some technologies that enables you to use HTML, CSS and Javascript to develop native iPhone apps. I've identified a few:

Are there other, similar products? What are the differences between them? Which should I choose?

(1) There is also Adobe FLEX, which can generate iPhone apps as of June 2011. adobe.com/products/flex - neoneye
(1) Check it out. Dude here is a To the point comparision. savagelook.com/blog/portfolio/… - Hikmat Khan
[+369] [2009-11-27 05:36:05] DennisJZH [ACCEPTED]

I registered with stackoverflow just for the purpose of commenting on the mostly voted answer on top. The bad thing is stackoverflow does not allow new members to post comments. So I have to make this comment more look like an answer.

Rory Blyth's answer contains some valid points about the two javascript mobile frameworks. However, his key points are incorrect. The truth is that Titanium and PhoneGap are more similar than different. They both expose mobile phone functions through a set of javascript APIs, and the application's logic (html, css, javascript) runs inside a native WebView control.

  1. PhoneGap is not just a native wrapper of a web app. Through the PhoneGap javascript APIs, the "web app" has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, etc. Basically any function that the mobile phone SDK provides can be "bridged" to the javascript world. On the other hand, a normal web app that runs on the mobile web browser does not have access to most of these functions (security being the primary reason). Therefore, a PhoneGap app is more of a mobile app than a web app. You can certainly use PhoneGap to wrap a web app that does not use any PhoneGap APIs at all, but that is not what PhoneGap was created for.

  2. Titanium does NOT compile your html, css or javascript code into "native bits". They are packaged as resources to the executable bundle, much like an embedded image file. When the application runs, these resources are loaded into a UIWebView control and run there (as javascript, not native bits, of course). There is no such thing as a javascript-to-native-code (or to-objective-c) compiler. This is done the same way in PhoneGap as well. From architectural standpoint, these two frameworks are very similar.

Now, are they any different? Yes. First, Titanium appears to be more feature rich than PhoneGap by bridging more mobile phone functions to javascript. Most noticeably, PhoneGap does not expose many (if any) native UI components to javascript. Titanium, on the other hand, has a comprehensive UI APIs that can be called in javascript to create and control all kinds of native UI controls. Utilizaing these UI APIs, a Titanium app can look more "native" than a PhoneGap app. Second, PhoneGap supports more mobile phone platforms than Titanium does. PhoneGap APIs are more generic and can be used on different platforms such as iPhone, Android, Blackberry, Symbian, etc. Titanium is primarily targeting iPhone and Android at least for now. Some of its APIs are platform specific (like the iPhone UI APIs). The use of these APIs will reduce the cross-platform capability of your application.

So, if your concern for your app is to make it more "native" looking, Titanium is a better choice. If you want to be able to "port" your app to another platform more easily, PhoneGap will be better.

Updated 8/13/2010: Link to a Titanium employee's answer to Mickey's question. [1]

Updated 12/04/2010: I decided to give this post an annual review to keep its information current. Many things have changes in a year that made some of the information in the initial post outdated.

The biggest change came from Titanium. Earlier this year, Appcelerator released Titanium 1.0, which departed drastically from its previous versions from the architectural standpoint. In 1.0, the UIWebView control is no longer in use. Instead, you call Titanium APIs for any UI functions. This change means a couple things:

  1. Your app UI becomes completely native. There is no more web UI in your app since the native Titanium APIs take over control of all your UI needs. Titanium deserves a lot of credit by pioneering on the "Cross-Platform Native UI" frontier. It gives programmers who prefer the look and feel of native UI but dislike the official programming language an alternative.

  2. You won't be able to use HTML or CSS in your app, as the web view is gone. (Note: you can still create web view in Titanium. But there are few Titanium features that you can take advantage of in the web view.) Titanium Q&A: What happened to HTML & CSS? [2]

  3. You won't be able to use popular JS libraries such as JQuery that assume the existence of an DOM object. You continue to use JavaScript as your coding language. But that is pretty much the only web technology you can utilize if you come to Titanium 1.0 as a web programmer.

Titanium video: What is new in Titanium 1.0. [3]

Now, does Titanium 1.0 compile your JavaScript into "native bits"? No. Appcelerator finally came clean on this issue with this developer blog: Titanium Guides Project: JS Environment. [4] We programmers are more genuine people than those in the Marketing department, aren't we? :-)

Move on to PhoneGap. There are not many new things to say about PhoneGap. My perception is that PhoneGap development was not very active until IBM jumped on board later this year. Some people even argued that IBM is contributing more code to PhoneGap than Nitobi is. That being true or not, it is good to know that PhoneGap is being active developed.

PhoneGap continues to base itself on web technologies, namely HTML, CSS and JavaScript. It does not look like PhoneGap has any plan to bridge native UI features to JavaScript as Titanium is doing. While Web UI still lags behind native UI on performance and native look and feel, such gap is being rapidly closed. There are two trends in web technologies that ensure bright feature to mobile web UI in terms of performance:

  1. JavaScript engine moving from an interpreter to a virtual machine. JavaScript is JIT compiled into native code for faster execution. Safari JS engine: SquirrelFish Extreme [5]

  2. Web page rendering moving from relying on CPU to using GPU acceleration. Graphic intensive tasks such as page transition and 3D animation become a lot smoother with the help of hardware acceleration. GPU Accelerated Compositing in Chrome [6]

Such improvements that are originated from desktop browsers are being delivered to mobile browsers quickly. In fact, since iOS 3.2 and Android 2.0, the mobile web view control has become much more performing and HTML5 friendly. The future of mobile web is so promising that it has attracted a big kid to town: JQuery has recently announced its mobile web framework. [7] With JQuery Mobile providing UI gadgets, and PhoneGap providing phone features, they two combined creates a perfect mobile web platform in my opinion.

I should also mention Sencha Touch [8] as another mobile web UI gadget framework. Sencha Touch version 1.0 was recently released under a dual licensing model that includes GPLv3. Sencha Touch works well with PhoneGap just as JQuery Mobile does.

If you are a GWT [9] programmer(like me), you may want to check out GWT Mobile [10], an open source project for creating mobile web apps with GWT. It includes a PhoneGap GWT wrapper that enables the use of PhoneGap in GWT.

[1] https://appcelerator.tenderapp.com/discussions/titanium-mobile-discussion/553-what-are-the-differences-between-titanium-and-phonegap
[2] http://developer.appcelerator.com/question/71/what-happened-to-html--css
[3] http://www.vimeo.com/9953236
[4] http://developer.appcelerator.com/blog/2010/12/titanium-guides-project-js-environment.html
[5] http://webkit.org/blog/214/introducing-squirrelfish-extreme/
[6] https://sites.google.com/a/chromium.org/dev/developers/design-documents/gpu-accelerated-compositing-in-chrome
[7] http://jquerymobile.com/
[8] http://www.sencha.com/products/touch/
[9] http://code.google.com/webtoolkit/overview.html
[10] http://www.gwtmobile.com

(10) Um... you say that "PhoneGap is not just a native wrapper of a web app." You go on to discuss the access it gives you to native device functionality. I think I covered this when I wrote: "What PhoneGap provides beyond that is a bridge between JavaScript and native device APIs. So, you write JavaScript against PhoneGap APIs, and PhoneGap then makes the appropriate corresponding native call. In that respect, it is different from deploying a plain old web app." If you registered just to refute my statement, you ought to have read it in its entirety. I know my posts are long, but... still. - Rory Blyth
(5) I could have been clearer, but the details of which APIs is complicated since it has varied over time from device to device what you can do (it's improved a lot, but the feature matrix for different platforms has undergone quite a few revisions). I wrote about one of the key differences, and what I wrote is correct - in fact, it's in accord with what you wrote. You simply went into more detail about which APIs you can access. - Rory Blyth
(9) As for Titanium and "native bits", I guess my mistake was reading this on their site - right on the front page for Appcelerator: "they run great because we compile Titanium to native code for peak performance." Perhaps you should write to them to let them know they're wrong. Check it out: tinyurl.com/yzlzvk5 - Rory Blyth
(6) For further information, check out the Titanium FAQ - the first topic, "Are these mobile webapps or native mobile applications" covers the issue succinctly. I'd repost a quote here, but I think you'd rather get it from the company directly, as they are, I believe, authorities on their product: tinyurl.com/ya9topg - Rory Blyth
(1) Stumbled upon my first and only post on stack overflow several months later, I have to say that I am joyfully surprised to see that my post has received some useful votes. Thank you guys... That post was meant to be a comment. Rory, the intent of my post was for technical discussion, nothing personal. My apology if it was worded wrong. Now is the funny part. Google just told me that Mickey also posted the same question on the Titanium support forum. It is interesting to see how a Titanium staff compares these two apps. The date of the post just made me laugh. tinyurl.com/29dlen8 - DennisJZH
Direct link here in case tinyurl let you down: appcelerator.tenderapp.com/discussions/… - DennisJZH
PhoneGap or titanium are not useful if you have to write some sort of serverside component. E.g.: I need to call a few java APIs to connect to a remote server and send and receive XML responses. Now, in phonegap I cant hook java methods to javascript...so its almost useless for any non-trivial application. - Ved
To Dennis & All geeks:- Please tell that, "In Windows", Whether the Source Code (HTML, CSS & Javascript) of a "Titanium Desktop App" can be seen? - cupcake
(1) Dennis...thanks for this and your continued updating/watching over it. Great info. - DA.
(4) Dennis, thanks for the great answer. Are you still developing with Titanium? Can you comment now that 1.7 has landed? - PaulM
That last paragraph == PhoneGap wins, period. - trusktr
I would also wonder about the update with recent advances to Titanium - ina
(3) He got his all reputation in this single answer! - shiplu.mokadd.im
(1) @shiplu.mokadd.im and almost all badges! - borisdiakur
1
[+193] [2009-10-04 03:49:06] Rory Blyth

From what I've gathered, here are some differences between the two:

  • PhoneGap basically generates native wrappers for what are still web apps. It spits out a WhateverYourPlatformIs project, you build it, and deploy. If we're talking about the iPhone (which is where I spend my time), it doesn't seem much different from creating a web app launcher (a shortcut that gets its own Springboard icon, so you can launch it like (like) a native app). The "app" itself is still html/js/etc., and runs inside a hosted browser control. What PhoneGap provides beyond that is a bridge between JavaScript and native device APIs. So, you write JavaScript against PhoneGap APIs, and PhoneGap then makes the appropriate corresponding native call. In that respect, it is different from deploying a plain old web app.

  • Titanium source gets compiled down to native bits. That is, your html/js/etc. aren't simply attached to a project and then hosted inside a web browser control - they're turned into native apps. That means, for example, that your app's interface will be composed of native UI components. There are ways of getting native look-and-feel without having a native app, but... well... what a nightmare that usually turns out to be.

The two are similar in that you write all your stuff using typical web technologies (html/js/css/blah blah blah), and that you get access to native functionality through custom JavaScript APIs.

But, again, PhoneGap apps (PhonGapps? I don't know... is that a stupid name? It's easier to say - I know that much) start their lives as web apps and end their lives as web apps. On the iPhone, your html/js/etc. is just executed inside a UIWebView control, and the PhoneGap JavaScript APIs your js calls are routed to native APIs.

Titanium apps become native apps - they're just developed using web dev tech.

What does this actually mean?

  1. A Titanium app will look like a "real" app because, ultimately, it is a "real" app.

  2. A PhoneGap app will look like a web app being hosted in a browser control because, ultimately, it is a web app being hosted in a browser control.

Which is right for you?

  • If you want to write native apps using web dev skills, Titanium is your best bet.

  • If you want to write an app using web dev skills that you could realistically deploy to multiple platforms (iPhone, Android, Blackberry, and whatever else they decide to include), and if you want access to a subset of native platform features (GPS, accelerometer, etc.) through a unified JavaScript API, PhoneGap is probably what you want.

You might be asking: Why would I want to write a PhoneGapp (I've decided to use the name) rather than a web app that's hosted on the web? Can't I still access some native device features that way, but also have the convenience of true web deployment rather than forcing the user to download my "native" app and install it?

The answer is: Because you can submit your PhoneGapp to the App Store and charge for it. You also get that launcher icon, which makes it harder for the user to forget about your app (I'm far more likely to forget about a bookmark than an app icon).

You could certainly charge for access to your web-hosted web app, but how many people are really going to go through the process to do that? With the App Store, I pick an app, tap the "Buy" button, enter a password, and I'm done. It installs. Seconds later, I'm using it. If I had to use someone else's one-off mobile web transaction interface, which likely means having to tap out my name, address, phone number, CC number, and other things I don't want to tap out, I almost certainly wouldn't go through with it. Also, I trust Apple - I'm confident Steve Jobs isn't going to log my info and then charge a bunch of naughty magazine subscriptions to my CC for kicks.

Anyway, except for the fact that web dev tech is involved, PhoneGap and Titanium are very different - to the point of being only superficially comparable.

I hate web apps, by the by, and if you read iTunes App Store reviews, users are pretty good at spotting them. I won't name any names, but I have a couple "apps" on my phone that look and run like garbage, and it's because they're web apps that are hosted inside UIWebView instances. If I wanted to use a web app, I'd open Safari and, you know, navigate to one. I bought an iPhone because I want things that are iPhone-y. I have no problem using, say, a snazzy Google web app inside Safari, but I'd feel cheated if Google just snuck a bookmark onto Springboard by presenting a web app as a native one.

Have to go now. My girlfriend has that could-you-please-stop-using-that-computer-for-three-seconds look on her face.


Thank you very much for your answer and it makes me more clear about PhoneGap and Titanium~ Thank you again - Mickey Shine
(22) The problem with the answer is that it's mostly WRONG. See DennisJZH's answer below. - jbwiv
(9) @jbwiv - The problem with your comment is that it's mostly based on DennisJZH's answer, which is mostly WRONG. See my responses below. To avoid further confusion, I'd suggest you both take a look at the official documentation for the products and also read my post in full. Thankyouverymuch. - Rory Blyth
You should listen to your girlfriend she is more important then anything discussed here - all of these questions will be irrelevant sooner then later - technology enables new technology but never a guarantees one to be a better human or help a relationship. I still stand behind apples tools - you code python w/xcode - you can even convert it to objective c - take the time to understand xcode in depth - why ask questions if you aren't willing to try new things anyway - why work at anything at all if you don't want to be the best at what you do. Peace - TouchGameDev
(15) @Matthew - Oh, the gf definitely has priority :) As for these questions being irrelevant basically because change happens (if I misunderstood your meaning, I apologize), the fact is that people do want answers to issues that exist right now. We could argue that none of this matters since the Earth is just going to get cooked in the future by the Sun as it burns its fuel and expands, destroying our planet, but... this gives us something to do while we wait. - Rory Blyth
(2) @Matthew - Also, this person is willing to try new things. It might not be the way you prefer, but it's still new. You still have to learn about iPhone development (read the docs on UI guidelines, etc.) There's no justifiable reason to try to turn someone away from trying to accomplish something just because you don't see the value in it. For example, I hate mushrooms, but don't try to stop other people from eating them. I understand that they like mushrooms in the same way I love saffron, and I know I don't want anyone trying to take saffron away from me just because they don't like it. - Rory Blyth
Amazing explanation, as i am web dev i want to shift ti PhoneGap but now i think about native apps. - Ajay Patel
(1) Yeah, but if you are a true web technology wizard, I'm sure no one will be able to realize your "web app" isn't really a native app. In the cases where its obvious that an app is a "web app" wrapped in UIWebView, then that means the creator didn't take the time or cared enough to make it of high enough quality. - trusktr
2
[+64] [2010-10-25 17:25:24] user288299

I'm taking a course in Android/iPhone development and we spent 8 weeks with Titanium (not full time) (Version was Titanium 1.4.2 and time was around November 2010). Here is my experience.

iPhone Android dual targetting

Even though the API guides claim that the functionality is available for both the Android and iPhone, this is not the case. Much of the stuff simply don't work on one of the platforms. Some things works differently.

A lot of the people in the class has done iPhone applications, and they can not make them work on Android without major rewrites. I developed a simple childrens app called Animap (see android market / Appstore in Sweden) and started developing under Windows. Once the Android target was working I opened the project on OS X. It does not show any build stuff for iPhone, just for Android. You need to start a dual target project under OS X. (Ok, I copied the relevant files to a new project). Next problem - the animations does not work on iPhone (they work on Android). The scrolling events does not work the same on the iPhone. (i.e on Android you get the untouch event when user stops scrolling and releases their finger from the screen, this does not happen on the iPhone).

Since this is not mentioned somewhere you basicly need to do trial and error programming on first one platform, then on the other platform. By trial and error I mean it will take about two days to get such a simple App as Animap working on the other platform. You will also need to have if (android) then... or if(iphone)... all over your code...

Download and setup

You must follow the instructions to the letter. Do not try to use java 64 bit. It will not compile the KitchenSink 1.4.0 demo application. (1.3 works OK!) You must put files directly on the C drive as long pathnames will make the external program not receiving all command line parameters if they get to long. (Fine for small programs though) 1/3 of the times, the toolchain simply stops and you must press 'launch' again. Then it will probably work... very unreliable. The simulator will not be found on startup and then you must simply kill of adb.exe with Ctrl+Alt+Delete and retry.

Network connection

On a wifi-network you sometimes looses the live connection and Titanium crashes on you (the compile/deploy interface) If you do not have a working internet connection it will not start as it can not log you in to their servers.

API

CSS, HTML and jQuery is a breeze compared to this. Titanium resembles any other old GUI API, and you need to set some properties for every single button/field/etc. Getting a field wrong is just to easy, remembering all the properties that needs to be set? Did you spell it with capital letters at the right place? (as this is not caught by the compiler, but will be seen as a runtime error if you are lucky to test that part)

In Titanium things simply break when you add another view on top of a control or click somewhere else in the GUI.

Documentation

Several API pages carry the Android symbol, but will only return a null when you try to create the control. They are not simply available on the Android platform despite the symbols. Sometimes Android is mention to not support a particular method, but then the whole API is missing.

KitchenSink

The demo application. Did I mention it does not compile if you put it in your Eclipse project folder because the path gets too long? Must be put on your C drive in the root folder. I currently use a symbolik link (mklink /J ...)

Undocumented methods

You must propably use things as label.setText('Hello World') to change a label reliable but this is not documented at all.

Debugging

Titanium.API.info('Printouts are the only way to debug');

Editing

The APIs are not available in any good format so you can not get ordinary code-completion with help etc. in Eclipse. Aptana please help out!

Hardware

It seems that the compiler/tools are not multithreaded so a fast computer with a fast harddrive is a must, as you must do a lot of trial & error. Did I mention the poor documentation? You must try out everything there as you can't trust it!

Some positive things

  • Open Source
  • From previous projects I have promised myself never ever to use closed source again as you can't simply fix things just by throwing hours and manpower at it. Important when you are late in the project and need to deliver for a hard deadline. This is open source and I have been able to see why the tool chain breaks and actually fix it as well.

  • Bugdatabase

  • It's also open. You can simply see that your not alone and do a workaround instead of another 4 hours spent on trial&error.

  • Community

  • Seems to be active on their forums.

Bugs

  • Titanium 1.4 is not threadsafe. That means if you make use of threads (use the url: property in a createWindow call) and program like the threads are working and send events with data back and forth you run into a lot of very, very strange stuff - lost handlers, lost windows, too many events, too few events, etc. etc. This is all dependent on the timing, putting the rows of code in different order might crash or heal your application. Adding a window in another file.js breaks your app.js execution... This also trashes internal datastructures in Titanium, as they sometimes can update internal datastructures in paralell, overwriting a just changed value with something else.

Much of the problems I have had with Titanium comes from my background on realtime systems like OSE who support hundreds of threads, events and message passing. This is supposed to work in Titanium 1.4 but it simply doesn't do it reliably.

  • Javascript (which is new to me) dies silently on runtime errors. This also means that small and common bugs, like misspelling a variable name or reading in a null-pointer does not crash when it should so you can debug it. Instead parts of your program just stop working, for instance an eventhandler, because you misplaced/misstyped a character.

  • Then we have more simple bugs in Titanium, like some parameters not working in the functions (which is quite common on the Android platform at least).

  • Trial and Error debug cycle speed Having run Titnium Developer on several computers, I noticed that the bottleneck is the harddrive. An SSD drive on a laptop makes the build cycle about 3-5 times faster than on a 4200 rpm drive. On a desktop, having dual drives in RAID 1 (striping mode) makes the build about 25 percent faster than on a single drive with a somewhat faster CPU and it also beats the SSD drive laptop.

Summary

  • From the comments in this thread there seems to be a fight for the number of platforms a tool like this can deliver app's for. The number of API seems to be the key selling-point.

This shines through very much when you start using it. If you look at the open bugtracker you see that the number of bugs keeps increasing faster than the number of fixed bugs. This is usually a sign that the developers keep adding more functionality, rather than concentrating on getting the number of bugs down.

As a consultant trying to deliver rather simple apps to multiplatforms for a customer - I'm not sure this is actually faster than doing native app development on two platforms. This is due to the fact that when you are up to speed you are fast with Titanium, but then suddenly you look down and find yourself in a hole so deep you don't know how many hours must be spent for a workaround. You can simply NOT promise a certain functionality for a certain deadline/time/cost.

About myself: Been using Python for two years with wxPython. (that GUI is inconsitent, but never breaks like this. It might be me that have not understood the threading model used by Javascript and Titanium, but I am not alone according to their open discussion forums, GUI objects are suddenly using the wrong context/not updating..???) before that I have a background in C and ASM programming for mobile devices.

[edit - added part with bugs and not being thread safe] [Edit - now having worked with it for a month+, mostly on PC but some on OS X as well. Added iPhone and Android dual targetting. Added Trial and Error debug cycle speed.]


(1) With the 1.4 release of Titanium I have now looked into the .apk files delivered from Titanium and they are simply not very good. They work, but the complete build directory is sort of zipped together in there. That means that minor build flaws like copying the splash screen to three different locations during the build suddenly consumes, as I have a large splash-screen image, about 1 meg of storage in the phone. And that is just for a very simple variant of hello-world. The javascript source code is also copied into the builds and into the .apk files, and thus delivered to all customers. - user288299
Release 1.5 is now out and is said to be major rewrite for the Android platform. I will not test this as I need to learn native Android development now. - user288299
Release 1.5 is now out and is said to be major rewrite for the Android platform. I will not test this as we have moved on to learn native Android development now. As we today were taught about the lifecycle of on native Android, I believe the problems I had with some windows loosing variable content the second time they were displayed was caused by Titanium not saving the state before the onPause() state of the lifecycle. developer.android.com/guide/topics/fundamentals.html#lcycles . Calling Titanium.Map.MapView.hide() and later show() might simply kill your local variables for the map - user288299
(1) Just played with 1.7, your description is so right. This platform is very hit and miss, with horrible performance and countless hours of work around searching. If you have the resources at the start of a project, build native for each platform. - Jonathon Kresner
3
[+25] [2010-01-11 23:30:33] Evan Kirchhoff

The Corona SDK (Ansca Mobile) uses Lua as its coding language. See lua.org for more about Lua.

While we plan to add further web integration and native-UI elements, our focus will tend to be on graphics-intensive applications, such as game development, as opposed to web-based technologies. In other words, we don't envision people writing Corona apps entirely in Javascript/HTML/CSS.


Do you have any plan or time scale for native UI scripting. I've done quite a bit with Lua and I really want to love Corona. For non game development Titanium seems a bit ahead. - uroc
(4) Hi, uroc. We've got native UI features arriving in release 1.1 (ETA later this week!), and more to follow shortly. However, my sense of Titanium is that they've done a nice job of exposing a large number of native UI elements, whereas we're going to focus on the most critical UI elements while pushing more engineering effort into animation and rendering features. The reasoning is that (i) there are already good products for UI-only apps, (ii) UI is the friendliest part of Cocoa (relatively speaking!), but (iii) anything involving OpenGL animation is a pain point on iPhone at the moment. - Evan Kirchhoff
it seems Corona is suitable for develop game instead app, is that right? - anticafe
4
[+18] [2011-03-22 21:51:46] Gorilla3D

I have been working with Titanium for over a week now and feel like I have a good feel about its weakness.

1) If you hoping you use the same code on multiple platforms good luck! You'll see something like backgroundGradient and be amazed until you find out android version doesn't support it. Then have to revert to using a gradient image, might as well use it for both versions to make the code easier right?

2) A lot of weird behaviors, on the Titanium android sdk you need to understand what a "heavy" window is just to get the back button to work, or even better orientation event tracking. This isn't how the android platform really is, its just how Titanium tries to make their API work.

3) Your thrown in the dark, Things will crash and you have to start to comment code and then when you find it, never use it. There are certain obvious bugs, like orientation and percents on android that have been a problem for over six months.

4) Bugs .... there are a lot of bugs and they will be reported, sit around for months, get fixed in a few days. I am surprised they even are planning to release a black berry mobile sdk when there are so many other problems with android.

5) Titanium Iphone versus Titanium Android javascript engines are completely different. On android version you can download remote javascript files, include and use libraries like mootools, jquery and so on. I was in heaven when I found this out because I didn't have to keep compiling my android app. The android apk installation process takes so long! Iphone none of that is possible, also the iphone version has a much faster javascript engine.

If you stay away from a lot of the native UI parts, i.e instead use setInterval to detect orientation changes, sticking with gradient images, forget about the back button, build your own animations, forget window header, toolbars, and dashboard. You really can make an api that works on both that doesn't require of lot of rewriting. But at that points its just as sluggish as a webapp.

So is it worth it? After all the pain, its worth every minute. You can abstract the logic and just build different UI for each rather then if elseing everywhere. Titanium lets you make fluid applications, that feel fast. You lose the powerful layout abilities of each platform but if you think simple, things can get done under a single language.

Why not a web app? On entry level market android phones its horribly slow to generate a webview and consumes a lot of memory you could be using to do more complex logic.


5
[+10] [2011-04-21 02:03:28] Tony Lukasavage

Here's a more recent and in depth analysis of Appcelerator and PhoneGap: http://savagelook.com/blog/portfolio/a-deeper-look-at-appcelerator-and-phonegap

And here's even more detail on how they differ programmatically: http://savagelook.com/blog/portfolio/phonegap-is-web-based-appcelerator-is-pure-javascript


6
[+9] [2010-01-01 05:52:35] jhaynie

native mapkit is supported in Titanium


7
[+8] [2010-02-17 03:11:56] user158678

Making HTML5 widgets tha look like iphone widgets is one thing, but making them perform equally well is another matter altogether. Performance of html5 animations (even plain View Transitions), scrolling long lists, responsiveness to gestures feel sticky and jerky. An iPhone user will notice the difference.

There's also some differences in the kinds of gestures that are supported by different devices which results in platform specific code and usability issues as well.

I'll stay with native apps for now I guess.


8
[+7] [2011-05-10 21:29:05] Adam Blum

Rhomobile Rhodes (http://rhomobile.com/products/rhodes) is very similar in approach to PhoneGap, but is the only framework with:

  1. a Model View Controller pattern (as most web frameworks provide)
  2. an Object Relational Manager
  3. support for all popular smartphones (including Windows Phone 7)
  4. a hosted development service (not just hosted build): http://rhohub.com
  5. a full debugger and SDK-less emulator in the RhoStudio IDE
  6. support for synchronized offline data

And one of the only platform with no support for development under Linux... - Luc Stepniewski
9
[+6] [2010-06-07 08:35:48] gyozo kudor

For anybody interested in Titanium i must say that they don't have a very good documentation some classes, properties, methods are missing. But a lot is "documented" in their sample app the KitchenSink so it is not THAT bad.


10
[+5] [2009-10-26 21:35:53] Jackson Miller

My understanding of PhoneGap is that they provide Javascript APIs to much of the iPhone APIs.

Titanium seems easier for a web developer background. It is a simple XML file to create a basic TabView application and then everything in the content area is controlled by HTML / JS. I also know that Titanium does provide some javascript access to some of the frameworks (particularly access to location information, the phone ID, etc).

UPDATE: Titanium added Maps API in version 0.8 of their framework.


Per the "Titanium seems easier for a web developer background." statement. You mean easier than native right? As PhoneGap seems to be more in line with someone with a web developer background than Titanium... - Serhiy
Yes, I mean vs native. - Jackson Miller
11
[+3] [2009-09-27 07:05:59] rpetrich

Of the solutions you mentioned, none of them appear to give you direct access to the MapKit framework introduced in OS 3.0.

As the Google Maps HTML widgets aren't nearly as good as MapKit (see Google Latitude for an example), you are probably best off developing a native Cocoa touch application, or choosing a solution you can extend to add MapKit integration. PhoneGap is extensible in this manner (it's open-source so it is by default), and some of the other solutions might be as well.

edit: Titanium now has support for MapKit


Thank you. But is there any essential difference between PhoneGap and Titanium? - Mickey Shine
(1) MapKit has been available natively in Titanium for quite a long time. - jhaynie
@jhaynie: Thanks. I've revised this answer to reflect that Titanium now has support (it didn't when it was written in September) - rpetrich
12
[+3] [2009-11-14 04:30:41] TouchGameDev

You should learn objective c and program native apps. Do not rely on these things you think will make life easier. Apple has made sure the easiest way is using their native tools and language. For your 100 lines of javascript I can do the same in 3 lines of code or no code at all depending on the element. Watch some tutorials - if you understand javascript then objective c is not hard. Workarounds are miserable and apple can pull the plug on you anytime they want.


(3) Apple may pull the plug...that's what I am concerning - Mickey Shine
(6) Quote: "Apple has made sure the easiest way is using their native tools and language." They really haven't. If they wanted to do that, they'd provide, say, Python support. There'd be garbage-collection (which alone would reduce the frequency of crashes - most iPhone apps are terribly written). I dig ObjC, and, like you, I'd rather use it than js, but that wasn't the op's question. Also, MonoTouch makes development easier than any of these options. I can create a property in one line; get a reference to the Document folder with one line... and so on. Apple's bits could be greatly improved. - Rory Blyth
(6) A good solution would be for Apple to provide their own ObjC alternative. Something for apps that don't need the level of control ObjC gives you. Especially for enterprise apps where devs should be focusing on functionality rather than reference-counting and property attributes. Or at least automate most of that with Xcode and the compiler. Give me a switch that allows for certain assumptions to be made and that can be bypassed in code where the dev chooses (like: retain and @synthesize my object properties by default - and, like the "real" ObjC 2.0, create my backing locals for me). Etc. - Rory Blyth
(2) Basically what you're saying is, let us write IPhone apps in C#. :) - Justin
13
[+1] [2011-01-29 03:17:52] netmastan

I've tried corona. It was good until I discovered it doesn't support streaming mp3 audio. So, I stopped right there. I think if I really want to be an iphone app developer I should learn obj c. All I wanted to make an app which has a list of radio stations and you click on them it start playing.


(2) Corona supports playing MP3 files (developer.anscamobile.com/reference/index/mediaplaysound) - Luc Stepniewski
14