I am at the beginning of designing a system to be deployed across a job site, your boring, dime-a-dozen, database server backend multi-client system.
One feature that I am very keen to implement in this system is the ability for a development team to making running changes with requiring a client reboot. I'm not so much worried about UI changes, those can require a reboot, but functional changes in behavior.
Currently I've started a basic layout using C# with WPF UI's, using an MVVM architecture, and making full use of PRISM and Dependency Injection.
I've thought of two approaches currently:
Plugin based system using the MEF frame work. So far in my prototyping, I been able to define default behavior, and then provide alternative behaviors depending on what dll is loaded.
Some sort of scripting support, be it LUA or trying the Roslyn based C# scripting. I've not researched this one as thoroughly yet, but it seems like it can work, but only if careful consideration is given to what tools are exposed to the scripts
Pros of approach 1: seems to work fine in small scale prototype, and gives a the most control very easily
Cons of approach 1: in my testing once a object is loaded in MEF, it can't be unloaded except be unloading the whole application domain, and passing objects between domains is...a process to say the least.
Pros of approach 2: Deployment would be very easy, and CSIX would be easy to write in existing tools. LUA would not be much different. From my (VERY limited) testing, there would be no problem with reloading the script from disk before each execution to ensure that the most recent one is ran. and This shouldn't cause any great performance hit, as a script should only be executed at the absolute most, once a minute, but more likely, once an hour.
Cons of approach 2: Least amount of development has been put into this so far. The surface of what is available has to be explicitly declared, and or else a change in requirements would result in a recompile and re-release any way. From what I can tell, the most limited in functionality so far.
So what approach would result in the most easy to modify system?
Also are there any pitfalls I missed with either approach?
Is there an Option 3 that I haven't considered yet?