I really like the plugin architecture of WinForms and I want to use a plugin architecture in Asp.net.
I've searched for plugins architecture in asp.net and I've found asp.net MVC samples, but I want to use classic asp.net project not MVC.
Does anyone know of any resources for patterns using classic asp.net, not MVC?
You can roll your own.
A plugin architecture needs a few not-so-complex parts:
Once you have this figured out, instantiating an instance of a plugin is simple. It works the same regardless of whether you're running in a web app or on the client:
System.Reflection.Assembly a = System.Reflection.Assembly.LoadFrom(plugin_path);
t = a.GetType("IPlugin");
IPlugin plugin = (IPlugin)Activator.CreateInstance(t);
then, you can use plugin.DoSomething()
to actually invoke functionality from the plugin. (Whether it is to render part of the html or save to a DB or whatever)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With