473,239 Members | 1,627 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,239 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 4997
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.