Best way to create Plugins

jcoder

Member
Joined
Oct 31, 2010
Messages
5
Programming Experience
5-10
Hi

I'm relatively new to VB.net and this question might sound vague, but does anyone have any idea on how best to implement plugins in VB.NET? I would actually like to write a invoicing system that i can extend by adding windows forms with some functionality. Some say i should use DLL's and others say using interface's are the best?

Any ideas?
 
There are a number of ways it can be done.

Historically, most people have defined their own interface named IPlugin in a DLL to represent a plugin module. The plugin developers then create a DLL that references that and implements the interface in a class. The application also reference the DLL containing IPlugin and uses Reflection to load all plugins from a specific folder. If you search the web for "plugin architecture .net" then you're bound to find lots of information on that.

More recently, Microsoft added the System.AddIn namespace to the Framework for a more structured way to do basically the same thing. I've never used it myself but I'm sure that you can read about it on MSDN and the web.

More recently still, Microsoft released the Managed Extensibility Framework (MEF), and that is what you should probably use for new projects. Again, I've never used it myself so I can only give you the name and tell you to search MSDN and the web. MEF will have more exposure than System.AddIn, I'm sure.
 
Back
Top