Using Phonegap for mobilizing Domino Apps - a new platform for Domino To Go?
Occasionally we hear the question "Why do you use Titanium as base for your cool Domino To Go framework? Why not using Phonegap?". The quick answer always is: because with Titanium you're able to create real native Apps easily, while with Phonegap you're producing websites that want to look like native Apps.
Nevertheless I was curious what Phonegap really is about, so I spend some time in the last days to dig my way through Phonegap. My leading question was: would it be possible to port Domino To Go to Phonegap?
Look and feel of Phonegap Apps
Maybe I did something wrong. Maybe I overlooked the "make everything look like native"-switch in jQuery mobile. In the end, I only had a couple of days for my experiments.
With Titanium on the other hand, all native controls are used. The App looks & feels like every other native App on the device. From my perspective, this is clearly an advantage for Titanium.
In Phonegap, you cannot do something like this:
you need to do it like this:
When working with a SQLite database it's the same. You cannot simply get a result set for a SQL query, you need to execute the query and give a callback that gets the result set. I feel this is unnecessary complicated.
Don't get me wrong, there are situations where callbacks really make sense. For example for HTTP requests, because you don't know how long the request will take and you don't want to block the whole App while the request runs. But for small file and database operations, I thinks that callbacks only make the code more complicated.
Is it worth the effort?
As said above, I think porting Domino To Go to Phonegap would be possible. But it would need some creative work to maintain one code base for Titanium and Phonegap while covering the excessive use of callbacks in Phonegap, which is a major difference to Titanium. So is it worth the effort?
At least for iOS and Android, I don't see a reason why to use Phonegap. Coding is more complicated, the UI doesn't look like native Apps and stuff like using an ecrypted SQLite database seems not to be possible with Phonegap. The best argument for supporting Phonegap would be that it is available for Windows Phone and Blackberry.