First of all, I am new to c++, but have experience in PHP. I am currently working on a little educational program for myself and a group of friends. I use linux all the time, but my friends tend to use windows. i would like to add a graphical end to the program and I am looking at using WxWidgets as of right now since it can be functional in both linux and windows.

Should I just throw my whole program into one binary, or should I compile the backend and frontend separately? From my understanding it would be better to do the latter, and it would also be some experience that I would really like to have.

If I do decide to separate the logic from the presentation, how does one go about linking the two together? The graphical end would need to update often, and the program itself will also be very busy maintaining a large group of data, and performing operations on it continuously. I do not think it would be as simple as calling the program through the frontend one time, passing it initial parameters, and then updating the screen with the return values, because the backend will not stop once called. It will need to keep running until the entire operation is finished, and the graphical end would need to update constantly throughout the operation.

When you have a media player that is based on xine, how do the frontends manage this connection? Is this the type of relationship I am looking for?

Thanks for any help.

Ok, I believe what I was asking about was multithreading, and since the first post, I have discovered a lot about it. I am going to attempt to answer my own question, so please correct me if I am wrong.

In my makefile, I will want my main program to be compiled into a library. Then, I will need to compile a top level binary that will call the library in and set it up as its own thread.

I do not know many more details than this. Right now I am looking into how to make the multiple threads communicate. If my answer is wrong, flawed, or if there is a better method, please help me out. Thanks.

This article has been dead for over six months. Start a new discussion instead.