MultipleExe's in a 'stand alone' Its sort of pattern.
I think up something, start with a SpikeSolution, next the program grows and grows, eventually I get lost.
This problem is caused mainly by the size of the program combined with lack of good architecture).
Now I found a good solution: multiple exe's. E.g. If the program generates a lot of data and you want to show this in some graphics, or you want to analyse a datafile and show it in a grid, you can write a graphicsViewer.exe and a gridAnalyser.exe that are called by the mainApp.
This standalones in themselves are much smaller, so its easy to understand and maintain the code.
The only problem now is to make the different exe's communicate in a good way. Probably a lot of smart people have handled this communication among different programs in a real smart way, and you may even find a lot on this subject elsewhere in this wiki. (So If you have any good or bad experiences with multiple exes please add yout tips and comments)
Anyhow: I handle all communications among different exe's this way:
Call an addOn with a command$ to pass information. (see ShellCall) I also add a timer to every addOn, to look into a multiple file every second
This mutilple file has a few key.value pairs , I use just two Subs. (You'll have to write the code yourself):
Call writeSettingsTo (key, value, mutualFile)
Call readSettingsFrom (key, mutualFile)
E.g I can close an addOn by the mainApp
in mainApp:
writeSettings ("end", "true", mutualFile)
in addOn:
If readSettings ("end", mutualFile) = "true" then
call writeSettings ("end", "false", mutualFile)
end
end if
Other informations can also be passed by this mutiple file, but best you pass as little as possible, as all communications make it harder to understand thew programs.
Advantages
Comments
This sounds to me like the philosophy behind the various Unices...