Click here to Skip to main content
Rate this: bad
good
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 9:24am

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
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 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 2 Jul 2011
Copyright © CodeProject, 1999-2014
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