[Interest] qt vs web-runtime

Harri Pasanen harri at mpaja.com
Wed May 2 21:41:33 CEST 2012


On 05/02/2012 12:05 PM, Stephen Bryant wrote:
>
> Hi,
>
> > in the company there's Qt Vs phonegap (and other web-runtime).
>
> > I'm obviously biased. What are the objective points in favor of Qt? 
> I can
>
> > not say anything about the Windows and Android we are not yet stable.
>

As usual it depends on what platform you are targeting.

Today Qt is interesting for Nokia (Symbian & N9).  Qt on Android 
(Necessitas) is quite good, depending on what you want to achieve, some 
parts are raw.

Blackberry 10 seems to get official support for Qt as well.

> The native binary that you compile when using Qt will give much better 
> performance than the VM - especially with Android 2.1 and earlier. 
> Given that the web view will also be natively compiled for the user's 
> hardware, the performance differences may be a non-issue. It depends a 
> lot on what your app does.
>
> However, you must expect binary compatibility problems in the future. 
> Intel is looking to grab a share of the market, and remember also that 
> MIPS got themselves Android certified before Intel did. There may also 
> be edge cases of incompatibility between the various vendors' 
> ARM-based solutions.
>
> You'd have a significantly increased amount of testing to do, across 
> the various hardware types. A HTML/JS based solution sidesteps that 
> problem.
>

Binary compatibility with phones/tablets is more than just CPU.  As soon 
as you start accessing Camera, GPS, etc. you typically need to test on 
device.  Screen resolution, GPUs , RAM, storage memory all differ, so 
even if you target just Android using java, you need lots of testing.  
Phonegap or any webkit based thingy is not going to make the requirement 
for that to go away.

I think 
http://zchydem.enume.net/2011/12/18/html5-for-mobile-app-development/ 
has a reasonable take on the subject.

> An Android user is unlikely to know details about which CPU they have, 
> and I have not yet seen a clean solution for making a single apk which 
> supports multiple architectures... but I haven't been looking very 
> hard either!
>
> Perhaps somebody else on this list has looked into it.
>

If the app distribution is through Google Play (was previously called 
Market) it automatically filters by instruction set, so the user does 
not need to know.   I think you need an apk / instruction set.

I'm not sure how the intel architecture is handled by the market, even 
if Intel has binary translation (they had that for Itanium too, look how 
well that panned out...).

> How much control do you have over your target platform?
>
> Personally, I would not recommend Qt for creating Android apps for the 
> general public, purely because of the testing and deployment issues. 
> This is not the case for iOS; don't know about WinPhone hardware.
>

Proof of the pudding is in the eating, so I've tried with two apps.  
Latest being:

http://store.ovi.com/content/269458 is the Nokia version

https://play.google.com/store/apps/details?id=com.mpaja.lovesme is the 
Android version.

Android lacked com.nokia.extras QML components so I had to go around 
that, but I could reuse the same code I used for Symbian 1, which also 
does not have those QML extensions.

Both app versions feature ads, Nokia has also in-app payment.

I didn't have any major issues with Android testing or deployment.  I'm 
compiling for armv7 on Android in an attempt to weed out low cost 
devices that don't have the internal storage required for Qt runtime.  
The runtime deployment is a one time affair, similar to JRE or .NET 
runtime.   Sure, it is annoying the first time around, but once there is 
a critical mass of Qt based apps on the market, the user is likely have 
it already.

> If you are looking to target Android, WinPhone and iOS with a 
> cross-platform app, and if the app's functionality is possible with 
> HTML/JS, I would suggest looking at PhoneGap with jQuery Mobile.
>
Yep, it all depends on the application type and what it is meant for.  
Don't think that cross platform alone is some magical key to success.   
It is quite easy to do an application that supports lots of platforms 
and does not get traction on any.

Also, the portability might not be all that good in the end, see for 
instance:
http://blog.doityourselfandroid.com/2012/04/06/phonegap-migrating-ios-application-android/

In contrast, I've been porting Qt apps to Android only because it is so 
easy and many of my frieds have android devices.   So I get some 
usability testing done even if my main target Nokia, not Android.

> I should also mention that there is a port of PhoneGap to the 'Qt 
> platform' called 'callback-qt'. It's a little lacking in plugins, but 
> it does work. This means you can have your PhoneGap app run on 
> Windows, Linux etc - which may help development.
>

I would suspect Qt/QML development be faster than PhoneGap or similar, 
with superior debugging tools.
The Simulator in Qt Creator works nowadays really well for most cases.  
Nokia N9 resolution is the same as many Android devices, so screen 
assets can be shared.

Just my 2 cents,

Harri




More information about the Interest mailing list