473,569 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Plugin architecture

COM has many facilities to assist with creating an application with Plugin
support, for example, component categories to determine what components to
load, the OLE specification and interfaces to allow negotiation of menus and
screen real estate.

Does .NET have any inherent Plugin support or specifications? Is there any
recommended way to add Plugin support to a .NET application?

Thanks,
Aaron Queenan.
Jul 21 '05 #1
4 2202
"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in message
news:ej******** ******@TK2MSFTN GP10.phx.gbl...
COM has many facilities to assist with creating an application with Plugin
support, for example, component categories to determine what components to
load, the OLE specification and interfaces to allow negotiation of menus and screen real estate.

Does .NET have any inherent Plugin support or specifications? Is there any recommended way to add Plugin support to a .NET application?


You can use fully qualified type names and the Activator to dynamically load
types that implement specific interfaces, is that what you are looking for?

-- Bob
Jul 21 '05 #2
"Bob Provencher" <bp*********@in current.com> wrote in message
news:Oz******** ******@TK2MSFTN GP12.phx.gbl...
"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in message news:ej******** ******@TK2MSFTN GP10.phx.gbl...
COM has many facilities to assist with creating an application with Plugin support, for example, component categories to determine what components to load, the OLE specification and interfaces to allow negotiation of menus and
screen real estate.

Does .NET have any inherent Plugin support or specifications? Is there

any
recommended way to add Plugin support to a .NET application?


You can use fully qualified type names and the Activator to dynamically

load types that implement specific interfaces, is that what you are looking

for?

Partially.

That would provide a generic way to create the object, but it doesn't
provide mechanism for objects to register as offering a particular service,
or enumerating such objects, or providing a mechanism for extending the user
interface of the host.

Thanks,
Aaron.
Jul 21 '05 #3

"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
"Bob Provencher" <bp*********@in current.com> wrote in message
news:Oz******** ******@TK2MSFTN GP12.phx.gbl...
"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in

message
news:ej******** ******@TK2MSFTN GP10.phx.gbl...
> COM has many facilities to assist with creating an application with Plugin > support, for example, component categories to determine what components to > load, the OLE specification and interfaces to allow negotiation of
> menus

and
> screen real estate.
>
> Does .NET have any inherent Plugin support or specifications? Is there

any
> recommended way to add Plugin support to a .NET application?


You can use fully qualified type names and the Activator to dynamically

load
types that implement specific interfaces, is that what you are looking

for?

Partially.

That would provide a generic way to create the object, but it doesn't
provide mechanism for objects to register as offering a particular
service,
or enumerating such objects, or providing a mechanism for extending the
user
interface of the host.


There is no such system in existance. You will have to write your own. While
it is possible to implement atleast most of the OLE standard, writing your
own will probably entail far less work than implementing all the OLE code
that would be required anyway(consider ing there are no wizards).

However, to load a component is relativly easy, Activator and reflection
makes locating components based on derivation and attributes *very* simple.
Ideally you would just use a folder or a config file that points to the
assembly and let the engine detect proper types.
Jul 21 '05 #4
We implemented plugins by attributing each DLL that contains plug-ins with
our PublishPlugInAt tribute(string uri, Type type)

On startup, our app enumerates all DLLs in the app directory and reflects
upon these attributes. We then build hashtables of the URI->Type, and the
interfaces that each plug-in supports.

Once this info has been built, the app simply enumerates all plug-in URIs
that implement an interface, and create them using the associated URI. This
lowers the binding between application components - new items can be dropped
in independantly, and the coupling between them is defined by the interfaces
alone.

You can also have a DirectoryWatche r that detect plug-ins that are installed
when your app is running.

Good luck!

Paul Wardle.
"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
"Bob Provencher" <bp*********@in current.com> wrote in message
news:Oz******** ******@TK2MSFTN GP12.phx.gbl...
"Aaron Queenan" <aq************ *********@conti ngent.com.au> wrote in message
news:ej******** ******@TK2MSFTN GP10.phx.gbl...
COM has many facilities to assist with creating an application with Plugin support, for example, component categories to determine what
components to load, the OLE specification and interfaces to allow negotiation of
menus and
screen real estate.

Does .NET have any inherent Plugin support or specifications? Is
there any
recommended way to add Plugin support to a .NET application?
You can use fully qualified type names and the Activator to dynamically

load
types that implement specific interfaces, is that what you are looking

for?

Partially.

That would provide a generic way to create the object, but it doesn't
provide mechanism for objects to register as offering a particular

service, or enumerating such objects, or providing a mechanism for extending the user interface of the host.

Thanks,
Aaron.

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1949
by: Jer | last post by:
Hi all, I am trying to get plugins working in my application. I am using the approach of writing an interface and then implementing that interface in each plugin. I would like to be able to just have a plugin directory, and on program launch scan that directory, load each dll in it and decide whether it's a valid plugin dll. So far...
2
2774
by: Chua Wen Ching | last post by:
Hi there, I had some doubts on creatings plugins. As most example on the internet shows how to write plugins onto a plugin host which is normally a windows form program. 1) Can i replace plugin host as class libraries instead of windows forms program?
5
3030
by: Tamir Khason | last post by:
Friends, maybe someone knows good references for .NET plugin based program architecture. E.g I want to be able to "put" class library(dll) in some place (where I do not the name of the class, but only structure ) and use it "plug-and-play" in main procedure without recompilation -- Tamir Khason You want dot.NET? Just ask: "Please,...
2
3057
by: Matt | last post by:
I'm hoping someone can steer me in the right direction to try to do the following: I am developing an application where we receive files from customers. Right now we receive a variety of formats. I was looking at writing some type of base application that would allow me to add-in either new assemblies or plugins, don't know how or which...
3
2334
by: CSharpNewBie | last post by:
Hi I am looking to create a Plugin Architecture. I looked at this extend or enhance the User Interface (UI) article http://www.codeproject.com/csharp/extensibleui.asp and It looks good and I would like to know if any better way to do. My requirements are I have several screens and each screen will have grid with data and thinking of...
1
1188
by: Craig Buchanan | last post by:
I am building an application to help researcher record the outcomes of their studies. These outcomes are document across a number of paper forms. The information documented on these forms varies widely. My current approach is to use a Document class with a collection of Question classes. I create an instance of the Document, add a number...
0
935
by: Craig Buchanan | last post by:
I am building an application to help researcher record the outcomes of their studies. These outcomes are document across a number of paper forms. The information documented on these forms varies widely. My current approach is to use a Document class with a collection of Question classes. I create an instance of the Document, add a number...
0
1429
by: Dan Dorey | last post by:
I'm in the midst of creating a plugin framework with the goal of making it as easy as possible for myself and other developers to both create new plugins and work with existing ones. Each plugin has a seperate sub-dir for each plugin with all external dependencies located in this directory. When I load these plugins dynamically everything...
4
2585
by: anglozaxxon | last post by:
I'm making a program that consists of a main engine + plugins. Both are in Python. My question is, how do I go about importing arbitrary code and have it be able to use the engine's functions, classes, etc? First, here's how it's laid out on the filesystem: -mainstarterscript.py -<engine> -__init__.py - -<plugin>
1
1935
by: Olie | last post by:
I was quite surprised to find virtually nothing about this but I may have been searching for the wrong thing. I want to know the best way to provide a programming interface to a plugin. I already have a plugin architecture that allows the application to call code in a plugin but I want the plugin to also be able to call code in the...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.