To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
MSDN Subscribers: Download the VS 2010 Release Candidate
MSDN Subscribers: Download the VS 2010 Release Candidate
Sell Your Code and Make Money?
Creating your own Tetris game using VB.NET
Article :: Improving Software Economics, Part 4 of 7: Top 10 Principles of Iterative Software Management



Go Back   VBForums > Visual Basic > Visual Basic .NET

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old Nov 28th, 2009, 12:02 PM   #1
TCarter
Addicted Member
 
Join Date: Nov 07
Posts: 177
TCarter is an unknown quantity at this point (<10)
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?
TCarter is offline   Reply With Quote
Old Nov 28th, 2009, 07:34 PM   #2
jmcilhinney
.NUT
 
jmcilhinney's Avatar
 
Join Date: May 05
Location: Sydney, Australia
Posts: 54,913
jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)jmcilhinney has a reputation beyond repute (3000+)
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:
  1. Public Interface IPlugin
  2.     Sub DoStuff()
  3. End Interface
You would obviously add whatever members your plugins needed for the app to interact with them. Anyone who now wants to create a plugin for your app would download the DLL containing the interface and create their own DLL project that references it and defines a class that implements the interface.

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
jmcilhinney is offline   Reply With Quote
Old Nov 29th, 2009, 06:01 PM   #3
TCarter
Addicted Member
 
Join Date: Nov 07
Posts: 177
TCarter is an unknown quantity at this point (<10)
Re: Custom Plugins for an app?

thanks!
TCarter is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic .NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:56 AM.




To view more projects, click here

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.