Results 1 to 2 of 2

Thread: Add-Ons

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Add-Ons

    This question might be one of those which can't be easily answered but I feel it's worth asking to see what replies I get.

    I want to build my application and I want to be able to allow for "add-ons" to be installed, My project will be a MDI application with many different windows being opened in it.

    I want some users to have optional other windows (winforms) which can be accessed. This means I need to someone work out what "add-ons" there are and adjust the menu and also add extra winforms?

    I assume, extra DLL's can contain my windorms? if not how would I add these?

    How can I get my menu to read what add-on's there are at the time my main window loads?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add-Ons

    There are three ways to create a .NET application that supports add-ons or plug-ins:

    1. Create a class library project and define an IPlugin interface in it. You will reference that library in your app and any plug-in developers will reference it in their libraries. At run time, your app searches one or more designated folders for assemblies and then, using Reflection, loads them and interrogates them to see if they contain any types that implement the IPlugin interface. Any that it finds it creates an instance of and then interacts with them through that IPlugin interface. If you search the web for .net plugin architecture then you should find some examples of this approach.

    2. In .NET 3.5, Microsoft introduced the System.AddIn namespace, to provide a more standardised way to create extensible applications and add-ins for them. You would start by reading the MSDN documentation for that namespace and its children and then you could no doubt find examples online.

    3. More recently, Microsoft has introduced the Managed Extensibility Framework (MEF), which provides greater functionality and flexibility. Again, start at MSDN.

    Although it might take a bit more work to get up and running, I'd recommend option 3.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width