CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Most efficient language for GUI (https://www.cfd-online.com/Forums/openfoam-programming-development/111102-most-efficient-language-gui.html)

husker December 27, 2012 07:18

Most efficient language for GUI
 
Hi,

I would like to build a GUI for OpeFOAM, essentially for my clients.

Here I suppose that there are many experts on this subject, I would like to hear your recommendations about choosing the language.

The only requirement is that the language must operate platform independently.

Regards

mkraposhin December 28, 2012 05:21

I am using pyhton + Qt + Xml

husker December 28, 2012 06:06

Do you think, what are the advantages and disadvantages of Pyhton?
Why wouldn't you use Java or C?

Regards

mkraposhin December 28, 2012 14:25

Answer is easy: Qt+Python can be inserted easily in SALOME. java and C - not

wyldckat December 29, 2012 17:09

Greetings to all!

Indeed, Python+Qt make a tremendous combo! Both are heavily used in Salome and ParaView; although ParaView's own code is in C++.
And Python is pretty much the standard language for "all things science that need scripting" nowadays...

About 2-3 years ago, from best to worst should be something like this (from my personal view):
  1. C++ with Qt.
  2. Python with Qt.
  3. C# via Mono and/or .NET.
  4. Java.
I only have C++ as best, because of my personal grief with Python's strict indentation... I get lost on those crazy indentation cliffs with no end in sight...

Anyway... Nowadays, the perception of "multi-platform" has gained at least two new targets: iOS and Android. Which means that there are couple more potential coding strategies:
  • HTML5 + Javascript interface. Either via Qt or without Qt. The rest would be pretty much be coded in back office, so it will depend on where the back office is installed.
  • Objective C, using one of the still-under-development packages that work on any ... er... tablet/phone/pc...
These coding strategies can lead to a particular case: the clients only get a GUI. Everything else is made in a single platform on your server, or in a turn-key server that you provide them. Therefore, you only have to worry on what your server can run most efficiently and that you can code most efficiently as well.


But keep in mind that any of these will also depend on your clients. If they want to modify the code themselves later on, they might not agree with your preferences.

Best regards,
Bruno

r08n January 7, 2013 11:07

If you want to build a GUI, you should think about the appropriate toolkit, not (so much) about the language, because the program will mostly make the API calls anyway. Qt has
been already mentioned, but maybe other toolkits are usable too (I have very little experience with GUIs to mention any). As for compatibility with Salome, ParaView, etc., it's important whether you are going to include pre- and postprocessing capabilities in the GUI at all.


All times are GMT -4. The time now is 00:59.