CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Posts
    199

    Question 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

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: Extendable Application in DOT NET

    Quote 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.

  3. #3
    Join Date
    Dec 2001
    Posts
    199

    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
  •  





Click Here to Expand Forum to Full Width

Featured