user interface - Best language for adding a GUI to a C++ software -
i've written c++ software can used comand line , that, obviously, can compiled , executed in different platforms (linux, windows , mac).
this software in particular simple, displays menu in command terminal few options, takes input files (.csv) acordingly, runs in few seconds, , prints output files (also .csv).
now write platform-independent gui without changing original source code.
which best language? c++? java? have experience or recommendations on this?
thank much!
you have change of c++ source code, in particular because gui toolkits event-driven based upon event-loop (often provided toolkit library).
alternatively, might have gui separate program (starting command-line thing), communicating form of ipc -often pipes- command line program, still have extend
i suggest use qt5, cross-platform (linux, windows, macosx, android, ....) graphical user interface framework library c++. if possible, use recent version of qt , code in c++11 (since closures become useful).
another approach (which still require architectural changes) might make software become specialized web server, using http server library libonion or wt (or perhaps poco); gui recent web browser. you'll need web coding skills (ajax, javascript, ...) , you'll better understand relation between continuations , web browsing. (see this & that).
if software running enough (e.g. less fraction of second) make core processing callback function (or qt slot) of gui program. should not have function running more few tenths of second (otherwise, user interface won't responsive enough), @ least not in main gui thread. otherwise, split computation in several parts or slices (e.g. "idle processing" in gui toolkits, cps & coroutines being relevant concept) sure event loop (at least 5 or 10 times per second) restarted, or adopt multi-threaded approach (with compute thread outside of gui main thread), brings painful synchronization issues (e.g. you'll use mutexes).
btw, question not "best" language find good-enough approach, library , framework.
Comments
Post a Comment