What is the standard way for allowing and implementing a plugin system for your application?
In my last application I made a simple interface for all plugins that they must implement. I then load all assemblies in the apps directory and toss out any that don't implement that interface.
One of the methods in the interface is a DoWork() method that periodically gets called on all loaded assemblies to perform any actions the plugins may have.
What is the "proper" way to do a plugin system? Do you just create an Interface for plugins? Should you periodically call a particular method in all plugins? Is there a more sophisticated way?
EDIT:
Thank you Matt Hamilton for the reference to the System.Addin namespace. This will most likely be the way I implement my plugins. However, I am still curious about plugin architecture in general and wouldn't mind some background on the best way they should be designed, implmemented.. how you should call on them once loaded, etc.