Cross-Platform v. Native?

Pages: 12
Is it more effective to program cross-platform or native development? Is the programmers control restricted by cross-platform development?

One particular case I want some information about is developing for the Android platform (is developing native for Android more effective than developing with something else where you code once, build everywhere? [i.e., Qt Creator]).
Well both have their advantages and disadvantages. If you stay native and decide later you want to port to another platform you will have to change out the native code. If you plan to do it on multiple platforms, then I would say try to stay with cross platform libraries that support your interested platforms because then all you have to do is get the appropriate tools and build the appropriate libraries and then just rebuild for that platform.

As for Android, I think Eclipse is the editor I see recommended normally. I've not used Qt Creator for that specifically so I don't know how well it is. Sorry I can't be more help on that.
I think cross-platform development for Desktop and Laptop Computers is more practical for me because I want to target all desktop environments, and learning the native language and libraries for each OS (which includes (and sometimes includes deferent versions of) Linux, Mac OS X, and Windows).

Thus, the question of Cross-Platform v. Native applies to Android and iPad/iPhone development.
Well depends on what libraries you are using. Some have support for Windows/Linux/Mac/Android/iOS/etc. so that you only have to have the tools and tweak your code a little and recompile to get it working. If you did everything in native code you would have to write and code several different versions of one application to make it work on other OSes and then debug it several times on each computer.

The only catch is, to develop on Mac, iPad, iPhone you have to have a Mac while you can have Linux to develop for Linux and Windows or Windows to develop for Windows and Linux (just have to have the right tools to do it for the Linux/Windows).

It really depends on what you end up wanting and your preferences.
I am using Qt5.2.

To develop for Mac OS X/iPad/iPhone, can you use Qt (suppose I have an iMac)?

Are the Qt libraries more efficient for Android development than using native Android development languages/libraries (i.e., Java--As far as I have heard)?
I'm not 100% sure because I've read that you have to use Xcode to develop apple products. You may have to read a little more into that part for yourself unless someone that develops for Mac knows the answer. I primarily stay to Windows and Linux, but keep read up on the other OSes.

As for Android, you can develop for it but from what I recall reading the emulation is a pain to run so it is more advised to have a device running Android to run in developer mode to debug and test your application(s).

I think they all have their own specific set of tools and libraries you have to use for Apple and Android, but don't quote me on that so I don't know if Qt is an option for working with GUI on those OSes or if they have their own GUI libraries to use.
Last edited on
closed account (Dy7SLyTq)
qt/boost is one of the more popular cross platform libraries. qt i would image would be fine on android. for mac you dont need xcode. however it makes it a lot easier to develop for ios if you have xcode (you might actually need it for ios. i havent done it in a while). i would imagine that you cant use qt with ios because apple heavily uses obj-c with the cocoa framework
Cross-platform and native are not opposites. "Native" means that the source code compiles to a program that is directly executable by some CPU. A source that can be compiled for a number of CPUs is therefore also cross-platform. Qt, for example, is a native framework in desktop platforms but not necessarily in mobile platforms.
"Native" is meant to contrast other execution modes, such as virtualization, interpretation, etc.
BHX wrote:
the emulation is a pain to run

This couldn't possibly be overstated. Awful emulator. Just horrid.
"Native" means that the source code compiles to a program that is directly executable by some CPU.


In context of GUIs, there is another meaning of "native" - "using native OS controls", as opposed to "painting UI controls by itslef".

Examples of native UI toolkits:
- wxWidgets
- Java SWT
- Xamarin

Examples of non-native UI toolkits:
- QT
- Java Swing
- PhoneGap
The question I have now is: What is the most effective Android developing language/IDE? Or both?

In this case, it does not matter if the language/IDE is Native or Cross-Platform.
Android language to use is definitely Java. A lot of people I know that do Android use Eclipse and they all seem to love it, so I guess I would recommend that IDE.
What makes Java and Eclipse better than C++ and Qt?
CDuck wrote:
What makes Java and Eclipse better than C++ and Qt?

With Android, you have to use Java/Eclipse last I knew so there is no point in arguing one over the other for it. I can't remember seeing anything about Android and C++ anywhere online.
C++ and QT is not made for making Android apps. There's probably a roundabout and complicated way of making that work, but Java + Eclipse is standard. I suppose you could probably use Java + Netbeans or something, but why would you when almost whatever you choose will be a worse option.
closed account (Dy7SLyTq)
@Mats: boost isnt made for windows, but that doesnt mean it doesnt work well with it. QT has an api for writing android apps. and the android os supports c++. there is an sdk that you use to develop c++ apps and "compile" them into apks
I didn't know they had a C++ SDK for Android because everything I looked into (even the Android site) always tells you to get Eclipse and has all the tutorials in Java.
What makes Java and Eclipse better than C++ and Qt?


Java uses native UI controls and Qt uses non-native. Which translates to much better user experience with Java apps, than Qt ones. And I really don't know, why you'd write apps in C++? Performance is not a problem for majority of those apps and even if performance is importrant, you can use NDK to write critical parts in C/C++ and then link to Java. Additionally, Eclipse/IntelliJ IDEA are years ahead of any C++ IDE.
Last edited on
rapidcoder wrote:
Additionally, Eclipse/IntelliJ IDEA are years decades ahead of any C++ IDE.


Fixed that for you.

For any serious android development, you'll want to have one or more devices that you can live load your builds on for routine testing. This makes the development cycle much faster unless the android emulators have freakishly improved since I used them last.
(at this point in time)
-I will use Qt and C++ for Desktop Development
-I will use Java and Eclipse (or another Java IDE) for Android Development

How are the iOS emulators?
Pages: 12