Question

I'm making a multitouch-screen app that for its function will just have to get positions of objects on the screen, have them ordered, be able to select them and drag them (sounds basic). I will also have to have a kind of history of actions so I could press the typical "Ctrl+z" and get X number of actions undone

The only language I know is C++ and I have made two simple GUI programs for Windows 7 in the past. For the porpoise of my app which is meant to be used by professionals, the screen should be 14inchs or bigger, considering there are 2 O.S. that support touch-screen events: W8 and Android, and how the app needs to be (explained in the first paragraph):

Should I have to learn another language to get this done?

If yes, what should it be: C# or Java? By what reasons?

If no, could you recommend any C++ libraries to: manage touch-events, make the GUI (both libraries should be free for commercial use).

Was it helpful?

Solution 2

First of all, what do you mean there are two operating systems that support touch-screen events? What about iPhone and Blackberry? Or Google Chrome OS?

In any case, I think you've got your question backwards, or I don't understand it. You do not choose a programming language and then decide your target platform. That hardly makes sense. You will usually have requirements by customers dictating the target platform, and only then you start to think about programming languages.

If there are multiple target platforms, then you may choose to reimplement the same application in different programming languages for each system. Or it may turn out better to use shared native C++ or C code which can be reused, at least partially, on several platforms. These are classical software-engineering tradeoffs, and it's impossible to tell you in general what's easier or more efficient.

You've tagged your question as "Android". For an Android app, you will usually want to implement as much as possible in Java and resort to native C++ or C code only if necessary. You do not use C# on Android. Mind that the often-heard assumption that native code is automatically faster is typically wrong and is made by people who do not measure but guess. Native code may be faster, but it may also be slower because of the extra indirection. However, as I said, reusability of native code on other platforms may be an important advantage and beat related disadvantages, such as reduced robustness or harder development.

OTHER TIPS

Have you considered using libgdx to write multiplatform stuff: http://libgdx.badlogicgames.com/features.html

there is a C++ plugin for it here: http://aevumlab.com/libgdx-cpp/

The beauty of libraries like this (and there are quite a lot when you google them) is that if you haven't got the time to learn a new language you can work around it this way. That being said if you see yourself working closely with Android in the future it wouldn't hurtto dip your toe in Java.

C# does have some nice support for touch screen, and it is a great next step from C++. Learning an extremely object oriented language such as C# or Java is almost a must these days. Though a touch screen application isn't exactly 'Hello World', making a small, touch-based app is a good way to get into the WPF side of C#.

To get you started, see this MSDN article: http://msdn.microsoft.com/en-us/library/ee649090(v=vs.110).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top