473,508 Members | 2,357 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 2195
"Aaron Queenan" <aq*********************@contingent.com.au> wrote in message
news:ej**************@TK2MSFTNGP10.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*********@incurrent.com> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
"Aaron Queenan" <aq*********************@contingent.com.au> wrote in message news:ej**************@TK2MSFTNGP10.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*********************@contingent.com.au> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
"Bob Provencher" <bp*********@incurrent.com> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
"Aaron Queenan" <aq*********************@contingent.com.au> wrote in

message
news:ej**************@TK2MSFTNGP10.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(considering 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 PublishPlugInAttribute(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 DirectoryWatcher that detect plug-ins that are installed
when your app is running.

Good luck!

Paul Wardle.
"Aaron Queenan" <aq*********************@contingent.com.au> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
"Bob Provencher" <bp*********@incurrent.com> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
"Aaron Queenan" <aq*********************@contingent.com.au> wrote in message
news:ej**************@TK2MSFTNGP10.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
1944
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...
2
2766
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...
5
3028
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...
2
3052
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...
3
2330
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...
1
1186
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...
0
929
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...
0
1419
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...
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,...
1
1933
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...
0
7120
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...
0
7323
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,...
1
7039
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...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5626
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,...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
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...

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.