Add run-time functionality to your application by providing a plug-in mechanism

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/5/27/add-run-time-functionality-to-your-application-by-providing.html
Published Tuesday, May 27, 2003 1:30 PM by RoyOsherove
Filed under:

Comments

Tuesday, May 27, 2003 9:30 AM by TrackBack

# ISerializable

ISerializable
Tuesday, May 27, 2003 9:30 AM by TrackBack

# ISerializable

ISerializable
Tuesday, May 27, 2003 9:30 AM by TrackBack

# ISerializable

ISerializable
Tuesday, May 27, 2003 9:30 AM by TrackBack

# ISerializable

ISerializable
Tuesday, May 27, 2003 9:30 AM by TrackBack

# ISerializable

ISerializable
Sunday, July 20, 2003 9:20 AM by OmegaSupreme

# re: Add run-time functionality to your application by providing a plug-in mechanism

Great article , 5 stars :D
Sunday, July 20, 2003 9:38 AM by Roy Osherove

# re: Add run-time functionality to your application by providing a plug-in mechanism

Thank you! :)
Tuesday, November 25, 2003 11:13 AM by Jamison R.

# re: Add run-time functionality to your application by providing a plug-in mechanism

Great article, this is exactly what I need. However, i've downloaded both the Demo and Source, and I have a question.

I'm trying to disect the code, so I can understand it (as opposed to merely using it), and i'm running into problems compiling the source because I don't use VS.Net, I use SharpDevelop and have to compile from commandline.

In the Demo, there is a file called PluginSDK.dll. Does this library contain both IPlugin and IPluginContext interfaces? If so, how exactly do I compile that from the commandline?

Any advice as to how to build this from the commandline would be appreciated.
Tuesday, November 25, 2003 11:23 AM by Roy Osherove

# re: Add run-time functionality to your application by providing a plug-in mechanism

Hi Jamison.
I'm not well acquainted with the peculiarities of compiling with the command line. The question to your answer is "yes". The PluginSDK is where the the Interfaces reside.
However, you might be interested in the Extensibility application block that I have just released.
Look here for details:
http://weblogs.asp.net/rosherove/posts/39484.aspx

It contains both source and compiled binaries with a help file.

--Roy
Tuesday, November 25, 2003 11:44 AM by Jamison R.

# re: Add run-time functionality to your application by providing a plug-in mechanism

Thanks for the rapid response. I figured it out, I think. Part of the problem was that I was missing the PluginCollection.cs file. Unless i'm missing something, it's not mentioned in the above article. So anyway, once I figured that out, making the PluginSDK.dll was done like so:

csc /t:library /out:PluginSDK.dll iplugin.cs iplugincontext.cs plugincollection.cs

I replaced the PluginSDK.dll that came with the demo with my newly compiled one, and everything works fine. Curiously enough the dlls are different sizes: The one that came with the demo was 16k, the one I made was 5k. I wonder what VS is adding to the bigger one?

I looked at EAP, and it is above my head right now. I just started learnig C# (OOP for that matter) just a month ago.
Tuesday, November 25, 2003 11:54 AM by Roy Osherove

# re: Add run-time functionality to your application by providing a plug-in mechanism

If you wraped your head about doing plugins with this article, you'll have no trouble figuring out EAP. It's the same pricniple and you'll see a lot that you have already seen here.
The only real addition is that instead of you having to look for the plugins yourself, there are base classes that fo this for you ("plugin providers") and you already have a basic pluin SDK with the IPlugin interface only you get mmore support from the interface for GUI stuff (menu caption, type of plugin and so on..)
Tuesday, February 10, 2004 9:23 AM by Slash

# Nice App, but...

Nice Application, but your plugin can't be unloaded. Consider using AppDomains and Remoting instead.
Tuesday, March 16, 2004 3:37 PM by TrackBack

# Simple Plug-in Architecture

Thursday, March 25, 2004 5:47 AM by TrackBack

# Roy Osherove on building a plug in architecture for your application

Wednesday, May 12, 2004 5:55 PM by TrackBack

# Plug it in...plug it in!!!!

Tuesday, June 27, 2006 5:07 AM by sam

# re: Add run-time functionality to your application by providing a plug-in mechanism

Hi Roy,

I am trying to find the direction to create  plug-in mechanism but for websites (asp.net)... module plug-in mechanism !!

Can you point me the right direction ?

thanks



Tuesday, June 27, 2006 5:13 AM by RoyOsherove

# re: Add run-time functionality to your application by providing a plug-in mechanism

sam: Google "ASP.NET Provider model" and you shoudl be just fine, I think.
Tuesday, June 27, 2006 5:18 AM by sam

# re: Add run-time functionality to your application by providing a plug-in mechanism

Hi Roy,

Thanks. I don’t know if is that the answer.
I need to create module plug-in mechanism like "dotnetnuke", "Rainbowportal".

I have to create one website that can be expand using module plug-in mechanism.

Is the ASP.NET Provider model the solution?

Thanks again !!