Front end to C++
-
I need to write a c/c++ program that will have multiple front ends, GUI, Serial, and maybe others. I want to seperate the interface from the main program as much as possible, so that interfaces can be changed easily. In this way, I could also separate some platform dependent features from the not-so platform dependent code. How is this usually done? Some thoughts that I had: 1) write a console application for the main application, and call the program from the interface program and use stdin/stdout? 2) Use sockets? 3) Make the main application into a library and import it into the front end code? 4) Just modulize main application with a central object/class and include the class into the GUI. How are most front ends done, especially if you have a c++ backend and want to build Visual Basic front end? Thanks, Kevin Shaffer kshaff03@msn.com
-
I need to write a c/c++ program that will have multiple front ends, GUI, Serial, and maybe others. I want to seperate the interface from the main program as much as possible, so that interfaces can be changed easily. In this way, I could also separate some platform dependent features from the not-so platform dependent code. How is this usually done? Some thoughts that I had: 1) write a console application for the main application, and call the program from the interface program and use stdin/stdout? 2) Use sockets? 3) Make the main application into a library and import it into the front end code? 4) Just modulize main application with a central object/class and include the class into the GUI. How are most front ends done, especially if you have a c++ backend and want to build Visual Basic front end? Thanks, Kevin Shaffer kshaff03@msn.com
Write a DLL for Windows in such a way that it can be compiled in Linux as a SO. The DLL can check the interface that is used. Johan
-
I need to write a c/c++ program that will have multiple front ends, GUI, Serial, and maybe others. I want to seperate the interface from the main program as much as possible, so that interfaces can be changed easily. In this way, I could also separate some platform dependent features from the not-so platform dependent code. How is this usually done? Some thoughts that I had: 1) write a console application for the main application, and call the program from the interface program and use stdin/stdout? 2) Use sockets? 3) Make the main application into a library and import it into the front end code? 4) Just modulize main application with a central object/class and include the class into the GUI. How are most front ends done, especially if you have a c++ backend and want to build Visual Basic front end? Thanks, Kevin Shaffer kshaff03@msn.com
Hi Kevin. I think most serious applications use, from long time ago, the MVC framework. MVC stands for Model-View-Controller, the idea comes from Smalltalk developement evironment. I cannot explain the issues since is a very well documented topic, surely there will be C++ implementations, at least I've seen the Gamma implementation (in the book Design Patterns) which you can read in the Observer pattern, since the framework is heavily based on it. regards eidan PS: Dolphin Smalltalk has the MVP (Model-View-Presenter) variant, which posses also interesting modifications.