Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

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.
 
Share this answer
 
Comments
Trevor Johansen 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 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. 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 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
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900