[RESOLVED] Idea's regarding a parent app with added modules/mini apps
Hi
I find myself rewriting these small apps for people all the time which do very basic things, usually rearranging files, merging, parsing etc, so im trying to come
up with an application where i can incorporate everything into 1 application,
the idea is....
1. have a parent application with simple ui which will 'host' the other functions/mini-apps
2. be able to add/remove functionality by simply adding/.removing a 'File' into a directory which the parent application will check for
3. have any found files listed in a toolbox/ribbon on a button which you click and using the information on the parent will kick into action
my initial idea 'for practice purposes' was, having the mini-app as console apps and winform apps and launching them from the parent and maybe pass arguments or have a global class available for them to get the information they need. which leads to question 1
Question 1....
assuming i have 2 projects open each with a form with a button and a label, how do i make them communicate to eachother by......
pressing the button on app1 form GIVES the text in the label to the other apps form
and
pressing the button on the app2 form REQUESTS what is on the label of the other form.
so simply put, SEND and REQUEST between applications
Question 2....
going back to my parent child app idea, should i be making dll's not mini-apps?
if so, how do i add 'random' dll's to an already compiled program (extensions)
thanks
Re: Idea's regarding a parent app with added modules/mini apps
1. What you're talking about is inter-process communication (IPC) and that is a widely discussed topic so you can find lots of information on it. There are various ways it can be done but one fairly simple way in .NET is via TCP using the TcpListener and TcpClient classes. Just note that TCP communication can run afoul of a firewall.
2. You can't really add a random DLL to an app because the code to be able to interrogate an unknown DLL and use it's functionality would be very hard to write. The DLLs really need to be written specifically to work with your app. Such a component is usually referred to as an add-in or a plug-in. Again, this is a very widely discussed topic. There is plenty of functionality in the .NET Framework to support this and it's usually done in one of three ways. The most recent and most flexible approach is to the the Managed Extensibility Framework (MEF). The "old" way is to simply design your own interface for each plug-in to implement. If you search the web for .net plugin architecture then you'll likely find several results using that "old" option.
Re: Idea's regarding a parent app with added modules/mini apps
Hi,
thanks i think you hit everything on the head there, ill look into those
regarding (IPC) im not after communication over the internet just yet, although i will also go over that, it looks interesting. im just interested in how i can get 2 programs talking to each other
am i right in saying if i used ip 127.0.0.1 with the tcplistener/Client classes etc, i would in effect achieve 2 programs communicating on the same pc, and it would be good practice for if i did want internet communication :) can i hit 2 birds with 1 stone there.
i will look into (MEF) right now so i can get started
thanks
Re: Idea's regarding a parent app with added modules/mini apps
Quote:
Originally Posted by
GBeats
am i right in saying if i used ip 127.0.0.1 with the tcplistener/Client classes etc, i would in effect achieve 2 programs communicating on the same pc, and it would be good practice for if i did want internet communication :) can i hit 2 birds with 1 stone there.
Correct. TCP communication is the same whether on the same machine, the same local network or over the internet.