Loosely Coupled Applications

fredriko

Active member
Joined
Jun 3, 2004
Messages
35
Programming Experience
10+
I want to be able to develop what I class as a loosley coupled system but have no idea where to start.
Essentially what I want to do is develop two or three different applications that are totally unrelated in any way. Each application performs its own task such as capturing data on a serial port or sychronizing files and folders etc.
What I want to be able to do is write the "worker" applications such that they carry on with their tasks but have a seperate "dashboard" application that can almost "listen" for application updates and display the status of each application along with any relevant information such as counters or timers that each individual application is using? I can write the applications no problem but I am struggling with how to notify the dashboard from a client or connect to a worker alternatively listen for events from the dashboard? Any Ideas
 
You should create a single client library and build it into all your apps. The library will know how to converse with the dashboard server, either via TCP, .NET Remoting or whatever.
 
What do you mean by a "single client library". Are you suggesting I have my client applications connect to a server of some kind and send updates? If so this isn't what I'm hoping for. I want the clients to be able to run independantly (as a windows service or windows client application) but have a dashboard that can detect whether it is running or not and if so what its properties are? I'm thinking something like the way MMC works on windows servers or in the control panel?
 
I meant that you should create a DLL that handles the communication on the client side. Each of your client applications would then reference that library, so each of them exposes the same interface to which your server can talk. That's how things like the MMC work: each snap-in has its own functionality but exposes a common interface that identifies it as an MMC snap-in. The MMC talks to that interface and cares nothing for whatever other functionality is provided. This is basically how all plug-in architectures work. There needs to be an element of commonality to all the pieces. That's the "single client library" I was talking about.
 
Do you know of any examples or a good starting point where I can learn about this. I understand in theory what you are saying but putting that into practice is different.
 
There's not going to be any tutorial on this specifically. Creating a library and referencing it from various projects is run of the mill. IPC is another matter. First you would need to decide how you wanted your processes to communicate. There are various options and you'll be able to find information on implementing any of them.
 
Back
Top