App structure ideas

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    App structure ideas

    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


  • Bob Powell [MVP]

    #2
    Re: App structure ideas

    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


    Answer those GDI+ questions with the GDI+ FAQ


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





    "John" <John@nospam.in fovis.co.uk> wrote in message
    news:%23aPj7SSd FHA.612@TK2MSFT NGP12.phx.gbl.. .[color=blue]
    > 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
    >
    >[/color]


    Comment

    Working...