App structure ideas

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I am writing a vb.net app to which I would like to allow people to write
add-ins by exposing various parts of the app. What sort of structure I am
looking for to accomplish the exposure to third parties? I am new to .net
and this is going to be my first serious app.

Thanks

Regards
 
The accepted technique for plugins in .NET apps is to create a custom
attribute with which you decorate classes that participate in the plugin
scheme. When loaded, the application can look for and dynamically load DLLs
in a given directory or in the application local directory and use
reflection to ascertain which of the classes contained in the DLLs are
tagged with the attribute. For consistency the base class of the plugin can
be an abstract class that you create for the purpose of establishing the
plugin behaviour or, my personal favourite, the plugin can implement a given
interface or set of interfaces. The latter method is cleaner in my opinion
because you don't have to force anything except the interface onto the
implementor of the plugin.


--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top