473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Communicate between Applications

Hello NG

I have two applications.

App1: Database application. Inserts/updates data to database.
App2: Notifier:
The notifier checks if a record has been created or modified, by loading the
table rows that has notify status 1 or 2. Thats easy. When the notifier
finds a record with 1 it brings up a window like in Outlook when new mail.

Now:
On the notifier form i want to have the ability to click on a button that
brings up App1 with the new data displayed.
And my question is: What to use to communicate between these two
applications in C#

Kind regards

Johnny E. Jensen
Aug 12 '08 #1
9 5007
On Aug 12, 11:08*pm, "Johnny E. Jensen" <j...@winner-crm.dkwrote:
Hello NG

I have two applications.

App1: Database application. Inserts/updates data to database.
App2: Notifier:
The notifier checks if a record has been created or modified, by loading the
table rows that has notify status 1 or 2. Thats easy. When the notifier
finds a record with 1 it brings up a window like in Outlook when new mail..

Now:
On the notifier form i want to have the ability to click on a button that
brings up App1 with the new data displayed.
And my question is: What to use to communicate between these two
applications in C#
You can use plain named pipes (see System.IO.Pipes), and serialize/
deserialize data manually. Or you can use .NET remoting (which can
also be set up to work over named pipes between two local processes).
Aug 12 '08 #2
>I have two applications.
>>
App1: Database application. Inserts/updates data to database.
App2: Notifier:
The notifier checks if a record has been created or modified, by
loading the
table rows that has notify status 1 or 2. Thats easy. When the
notifier
finds a record with 1 it brings up a window like in Outlook when new
mail.
Now:
On the notifier form i want to have the ability to click on a button
that
brings up App1 with the new data displayed.
And my question is: What to use to communicate between these two
applications in C#
You can use plain named pipes (see System.IO.Pipes), and serialize/
deserialize data manually. Or you can use .NET remoting (which can
also be set up to work over named pipes between two local processes).
Why not to expose public properties and events in app1? Simple "observer"
desing pattern.
Aug 13 '08 #3
On Aug 13, 10:02*am, Andrei Varanovich [C# MVP] <dotne...@gmail.com>
wrote:
I have two applications.
App1: Database application. Inserts/updates data to database.
App2: Notifier:
The notifier checks if a record has been created or modified, by
loading the
table rows that has notify status 1 or 2. Thats easy. When the
notifier
finds a record with 1 it brings up a window like in Outlook when new
mail.
Now:
On the notifier form i want to have the ability to click on a button
that
brings up App1 with the new data displayed.
And my question is: What to use to communicate between these two
applications in C#
You can use plain named pipes (see System.IO.Pipes), and serialize/
deserialize data manually. Or you can use .NET remoting (which can
also be set up to work over named pipes between two local processes).

Why not to expose public properties and events in app1? Simple "observer"
desing pattern.
He's talking about two different applications - that is, two different
processes - not a class library and an executable. You can't
subscribe to an event in a different process.

http://en.wikipedia.org/wiki/Inter-p..._communication
Aug 13 '08 #4
He's talking about two different applications - that is, two different
processes - not a class library and an executable. You can't
subscribe to an event in a different process.
So you can't subscribe to MS Word or Excel event from your app?
Aug 13 '08 #5
On Aug 13, 11:18*am, Pavel Minaev <int...@gmail.comwrote:
On Aug 13, 10:02*am, Andrei Varanovich [C# MVP] <dotne...@gmail.com>
wrote:


>I have two applications.
>App1: Database application. Inserts/updates data to database.
>App2: Notifier:
>The notifier checks if a record has been created or modified, by
>loading the
>table rows that has notify status 1 or 2. Thats easy. When the
>notifier
>finds a record with 1 it brings up a window like in Outlook when new
>mail.
>Now:
>On the notifier form i want to have the ability to click on a button
>that
>brings up App1 with the new data displayed.
>And my question is: What to use to communicate between these two
>applications in C#
You can use plain named pipes (see System.IO.Pipes), and serialize/
deserialize data manually. Or you can use .NET remoting (which can
also be set up to work over named pipes between two local processes).
Why not to expose public properties and events in app1? Simple "observer"
desing pattern.

He's talking about two different applications - that is, two different
processes *- not a class library and an executable. You can't
subscribe to an event in a different process.

http://en.wikipedia.org/wiki/Inter-p...communication- Hide quoted text -

- Show quoted text -
I guess publish-subscribe pattern work fine here. There are standard
ways of implementing the observer pattern between the applications.
One of such implementation can use remoting.
Aug 13 '08 #6
On Aug 13, 12:08*am, "Johnny E. Jensen" <j...@winner-crm.dkwrote:
Hello NG

I have two applications.

App1: Database application. Inserts/updates data to database.
App2: Notifier:
The notifier checks if a record has been created or modified, by loading the
table rows that has notify status 1 or 2. Thats easy. When the notifier
finds a record with 1 it brings up a window like in Outlook when new mail..

Now:
On the notifier form i want to have the ability to click on a button that
brings up App1 with the new data displayed.
And my question is: What to use to communicate between these two
applications in C#

Kind regards

Johnny E. Jensen
As I see this case can be solved using "observer" / publish-subscribe
pattern between the application. Check out the standard ways of
implementing the pattern. As a middle tire you can use number of
technologies like ".Net Remoting" or introduce a channel like MSMQ or
a media bus or can be achieved through windows service also. Let us
know more details of the requirement.

-Cnu.
Aug 13 '08 #7
On Aug 13, 11:30*am, Andrei Varanovich [C# MVP] <dotne...@gmail.com>
wrote:
He's talking about two different applications - that is, two different
processes *- not a class library and an executable. You can't
subscribe to an event in a different process.

So you can't subscribe to MS Word or Excel event from your app?
You can, but it uses COM under the hood to do the remote invocation,
which does all the necessary marshalling (and probably ends up using
pipes, anyway). An apt .NET analog would be .NET remoting, as others
(including me) have already mentioned - but it still takes some effort
to implement, and it isn't quite seamless (even if close).

The main trick when using remoting when the client subscribes to event
and then sits there passively is to ensure proper lifetime management
of server objects.

Yes, for a server scenario, MSMQ is also a good option. But for a
relatively lightwent client app, Remoting over pipes is probably still
the easiest and the fastest.
Aug 13 '08 #8
>>He's talking about two different applications - that is, two
different processes - not a class library and an executable. You
can't subscribe to an event in a different process.
So you can't subscribe to MS Word or Excel event from your app?
You can, but it uses COM under the hood to do the remote invocation,
which does all the necessary marshalling (and probably ends up using
pipes, anyway). An apt .NET analog would be .NET remoting, as others
(including me) have already mentioned - but it still takes some effort
to implement, and it isn't quite seamless (even if close).

The main trick when using remoting when the client subscribes to event
and then sits there passively is to ensure proper lifetime management
of server objects.

Yes, for a server scenario, MSMQ is also a good option. But for a
relatively lightwent client app, Remoting over pipes is probably still
the easiest and the fastest.

OK, let's stick on the remoting over pipes :-) In fact I was talking about
the pattern and you was talking about the transport to implement this pattern.
Aug 13 '08 #9
>>As I see this case can be solved using "observer" / publish-subscribe
pattern between the application. Check out the standard ways of
implementing the pattern. As a middle tire you can use number of
technologies like ".Net Remoting" or introduce a channel like MSMQ or
a media bus or can be achieved through windows service also. Let us
know more details of the requirement.

-Cnu.

As I am following this thread.
Any sample coding to do the .NET remoting for this scenario?
Aug 15 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anand Ganesh | last post by:
Hi All, How will I make a VB6 application communicate with my VC#.NET application? I want the information to be passed back and forth between these two applications? Any suggestions please....
1
by: Qumer Mumtaz Goraya | last post by:
Hi How can I communicate between IE and an other application.I am able to communicate between two applications of mine but confused how to do this with IE.I just wanna know how IE get the shared...
4
by: Gery D. Dorazio | last post by:
Gurus, I have a server running Windows Server 2003 Web Edition running multiple web sites on the same server. All the web sites on this server are owned by the same company. The company does...
11
by: kd | last post by:
Hi All, Can anybody suggest as to what is the best way communicate between 2 applications residing on the same machine? Thanks. kd
6
by: Mike9900 | last post by:
How can I connect my .NET app which use remoting to communicate over internet, 2 instance of the same app? My app is already done using .NET Remoting. I am wondering if to change them to WCF or...
12
by: MrQuan | last post by:
G'day all, I have a requirement to communicate between two or more PCs over the Internet, however I have no idea how to go about this. I'm not talking about a chat programme as such, I want to...
3
by: SQACSharp | last post by:
Hi, I need to transfer text (or maybe binary) data from one .net application to another .net application. What is the best way to do this since it's on the same computer and both application...
8
by: michelqa | last post by:
Hi, I need to communicate between many C# applications. is tcp socket is the best way to do this? Only the main application that send the initial request can be a remote application in a...
4
by: hashc | last post by:
hi i want to be able to have two applications in c# visual studio.net 2008 to be able to communicate with each other by passing parameters. for example; Appli1.exe is a form with 4 buttons...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.