|
|
#1 |
|
Addicted Member
Join Date: Nov 07
Posts: 177
![]() |
Custom Plugins for an app?
Hello guys,
I am trying to figure out an easy way to add custom plugins for the app for additional features, without people having to download a whole new update each time. either by DLL? or what? Any ideas would be great. i guess the way i'd want it to work is, the program will auto detect the plugin file. Then, add's a specific value to either a button array, or add's a picture, etc. Once that button is clicked, it will open a new form designed the way i want it. from within the plugin itself. So its a module. What would be the easiest way to do this? |
|
|
|
|
|
#2 |
|
.NUT
Join Date: May 05
Location: Sydney, Australia
Posts: 54,913
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Custom Plugins for an app?
This is an oft-discussed topic concerning the use of interfaces. You would create a DLL that defines an interface for any class that wants to be a plugin for your app, e.g.
vb.net Code:
Your app will then most likely have a folder specifically for plugins. At run time your app will use reflection to load each DLL in that folder and query it for types that implement your IPlugin interface. It can then interact with those classes to through the members of that interface to provide extended functionality. If you search the web for something like plugin architecture .net then you'll likely find various blogs and the like that will go into more detail. That's the way it has historically been done and can still be done if you desire. It's also worth noting that, from version 3.5, the .NET Framework includes an architecture for creating extensible applications. For more info on that: http://msdn.microsoft.com/en-us/library/bb788290.aspx
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms | MSDN Data Walkthroughs MSDN "How Do I?" Videos: VB | C# VBForums Database Development FAQ My CodeBank Submissions: VB | C# (ForumAccount has translated some of my VB submissions to C#) My Blog: Defining and Raising Custom Events | Manipulating GDI+ Drawings | Using Parameters in ADO.NET |
|
|
|
|
|
#3 |
|
Addicted Member
Join Date: Nov 07
Posts: 177
![]() |
Re: Custom Plugins for an app?
thanks!
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|