Click here to Skip to main content
11,644,731 members (71,668 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ C Java UI QT GUI QT-Creator
I am beginning a new project that requires a nicely refined user interface but also requires portability between Windows and Linux. I am unsure about which way to go about this though, my choices seem to be:

Use c/c++ and a cross platform toolkit such as QT
Benefits are I already use c/c++ and just need to learn the QT library

Write the whole project in Java
Benefits are its the same code for every system but I'm new to Java

For some background the project requires access the the systems sound card and the ability to talk to a USB connected device. The device has drivers for Win/Linux/Mac with a uniform API on each platform but I'm worried that if I use c/c++ as the core program I will need to compile three different versions with subtle changes such as device initialization.

Where should I focus my efforts?
Posted 2-Jul-11 8:24am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Learning Java from C++ is easy.
Your problem will not be Java itself, but the library you will use for GUIs.
And it is the same problem as learning the QT library.
Trevor Johansen at 2-Jul-11 20:59pm
Is Java a good place to focus my energy on? All of the applications I plan on writing to handle my hardware need to be Windows/Linux compatible as 90% of users are on Windows and I develop on Linux.

It seems like the logical choice but it still has a lot of pitfalls such as throughput when handling external communications. For example an Isosynchronous USB device will never have a hope of achieving USB 2.0 bandwidth when the application is written in Java.

What is a decent looking GUI library for Java? All I have heard of is Swing.
Emilio Garavaglia at 3-Jul-11 5:56am
Java is not for performance, C++ is not for "opennes", especially if used close to the hardware. Gui can even be none of the two, but a HTML/XML browser app, driven by a C++ server socket. I probably code the core as C++ module, with a plain C interface, to be linked by other modules, written in whatever language is suitable to make the job done. A QT based C++ gui is fine (but .. hey .. that's not "pure C++", there is lot of other scripting translated into C++ code behind it).
TorstenH. at 4-Jul-11 3:12am
lame argument! Java can have a really nice performance nowadays.
You just need to give it the needed resources. We are developing real time solutions on Java - that's not a problem at all.
Emilio Garavaglia at 4-Jul-11 3:49am
What does it mean "You just need to give it the needed resources"?
Do the right comparison with the SAME resources! Otherwise whatever thing we may say is true!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 680
1 494
2 Sergey Alexandrovich Kryukov 464
3 Afzaal Ahmad Zeeshan 418
4 CPallini 336
0 OriginalGriff 925
1 DamithSL 636
2 Afzaal Ahmad Zeeshan 622
3 Sergey Alexandrovich Kryukov 548
4 CPallini 521

Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 2 Jul 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100