Plugin Capabilities???

S

Steve

Hi

I have 2 questions about plugins

1) If I have a form that lists plugins in a menu. Can I design each
plugin to place controls
on the main form when it is selected that collect data for the
plugin???

2)If I have a series of plugins that act on some data. Is is best to
passs the data to each plugin say as
a an XML document??

data - car parts number on invoice

plugin1 - adds parts description to data
plugin2 - add price to part number
plugin3 - add total cost of parts

Thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Steve,

For each question, I would say the answer lies in creating an interface
that your plugins implement. Have the plug in interface have a
method/property which will return a control (which the plug in provides)
which you can then place on the main form of your interface.

The same thing applies for the second question. Have a method on an
interface which takes a data container of some sort (a DataSet will do, or
you can create a type of your own), and then call the plug in's
implementation of that method.

Hope this helps.
 
A

Allen Anderson

I recently wrote a plugin framework for alerting and ran into a lot of
these same issues. I'm thinking about making that framework open
source (I'll post the details of that on my website soon, but not
yet). Anyway, because I wanted to allow the plugin to have its own
dialog in particular wizard, I had an interface return a custom
control type I pre-defined that acted as a configuration.

so, 1: yes, you can and 2: the best way IMHO is passing the data via
XML with predefined XSD's to validate them.

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top