RE: Loading applications at runtime
- From: ..:: Kevin ::.. <Kevin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Jul 2005 04:51:03 -0700
Joanna,
I am currently working on a project where we have done pretty much what you
are trying to do. Our project consists of an exe that acts as the shell, and
all the modules that slot into this shell are developed as DLL's with user
controls in them.
The way we have tackled the problem was to make the controls in our DLL
implement an interface that we defined. The interface itself is pretty
basic, and it just has a few details in there such as the controls display
name.
The shell searches a specified directory on startup that contains all of our
dll's. The shell then loads each dll in turn into an assembly and loops
through the types collection looking for items that implement our defined
interface. Once it has found a match we use reflection to get some
information out of the control and add it to a menu.
When a menu item is clicked, we use the information we stored to load the
control via reflection and display it in our shell program.
Using this method, we have made the shell application completly seperate
from our modules, all it requires is that the module implements our defined
interface.
We have also used a custom implementation of an observer pattern so that the
modules can communicate with the shell.
I hope this is of some help or at least pointed you in the right direction
of where to start looking for more information?
Kevin
"joannax" wrote:
> Hi,
> I am an experienced programmer in several languages, but new to VB .NET. I
> am designing an application which consists of a single "menu" program/form
> that selectively transfers control to several other programs/forms. This is
> straightforward when all the forms are in one assembly. But I need this to
> be modular and dynamic so that each program loaded can be in its own .exe and
> the central program can load and execute it then regain control when the
> called program is done. I've tried "process.start" but I feel there must be
> a better way, especially since I'd like to be able to communicate information
> between the controller and the satellite applications.
> Important point is that the controller will be designed so that it doesn't
> know beforehand which programs are installed and can be called.
> Also, there is some communication with a server by all the programs, but the
> classes involved do not need to be shared if this cannot be done.
> In other languages there is an external call, load or "chain" mechanism for
> resolving references at runtime. Can this be done in VB .NET?
>
> Thanks for any help.
> --
> Joanna
.
- Follow-Ups:
- RE: Loading applications at runtime
- From: joannax
- RE: Loading applications at runtime
- References:
- Loading applications at runtime
- From: joannax
- Loading applications at runtime
- Prev by Date: Loading applications at runtime
- Next by Date: Re: Loading applications at runtime
- Previous by thread: Loading applications at runtime
- Next by thread: RE: Loading applications at runtime
- Index(es):
Relevant Pages
|