-
December 12th, 2005, 07:44 PM
#1
Extendable Application in DOT NET
Hi Gurus,
I have a little problem and I am lost how to do it with DOT NET technologies....
I want to be able to create an extendable application using a DOT NET technology so that I can create components that comply with an interface definition without having to add references to the base application and re-compile the application every time a new component is created.
From my old C++ COM days, if I wanted to create an application that had an extenable interface I would do something simular to the following:
1. Define a COM Interface for the external COM component that the application would instance.
2. Keep the CLSID and other properties needed to instance the compliant remote object in a setting location (ini, database, registry etc)
This way I could create an application that could instance any compliant COM object without having to compile the base application every time a new extension was created all I have to do is distribute a new setting file with the component when it is created. Basically I stole the same idea used in the OPC Standard from Microsoft.
I know I can still use the same COM idea, but I am hoping for a more elegant native DOT NET method of doing the same thing.
Any Ideas
KnNeeded
-
December 12th, 2005, 07:58 PM
#2
Re: Extendable Application in DOT NET
Originally Posted by KnNeeded
I want to be able to create an extendable application using a DOT NET technology so that I can create components that comply with an interface definition without having to add references to the base application and re-compile the application every time a new component is created.
I know I can still use the same COM idea, but I am hoping for a more elegant native DOT NET method of doing the same thing.
It's much easier in .NET: Define an interface for your components. Your component assemblies contain classes which implement that interface. At run-time, your application loads those assembly DLLs and uses reflection to see whether they contain classes implementing the required interface. If they do, you can instantiate them.
-
December 12th, 2005, 08:06 PM
#3
Re: Extendable Application in DOT NET
Thanks gstercken, good idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|