I have been trying to wrap my head around ways to create a program where I can make updates on the fly, without having to recompile the entire program. How is this usually done?
I have read up a little on .dll files for windows, and delayed linking with linux, but I am having trouble understanding how I would accomplish this.
Let me provide a simple example of what I wish to accomplish.
Let's say I create a console program called iAmDog, where you can type in actions for a dog to perform.
This dog initially only has one command, you type 'bark' and the program produces the output 'roof roof!'
ok, now lets teach the dog how to sit.
Is there any way, without recompiling the main program, to update this dog's functionality?
Do I create a dog class in a .dll and then make a call to the external class in my main program somehow? Would this allow me to recode the functionality of the .dll, and not the main exe, so that dog could now bark and sit?
Could I create an external class that is passed a string (the command 'bark' or 'sit' ) by the main exe, and then just update this external class without updating the main exe to interpret newer commands?
The quesiton I would ask is how do you expect this new functionality to be added? Will the user be able to add the functionality themselves? Would they do so through the interface of this program?
Ideally only I or some other authorized programmer's would add the functionality. This would not be a scripting function a user could add on the fly.
My Ideal solution though, would allow a user to start the program with the bark functionality, prove that it works, try the sit command to prove it doesn't work, and then without restarting the program, I could program the additional sit command, and then the user could use that command.