tags:

views:

36

answers:

1
+1  Q: 

Services and WPF.

This is a general technologies question.

I am building a Media Player for a school project. It is written in C# and uses WPF for the interface. I am adding a service to it to maintain the database as the user makes changes to it. I also want it to contain the config class I built in a previous iteration which is the subject in the observer design pattern. However I have no idea what would be the best way to communicate between the service and the interface pieces of the application. I have seen many ways to do this and I would like some advice about which of the myriad .NET technologies for communicating between services/processes/etc you would recommend.

+2  A: 

WCF is Microsoft's recommended way for applications to communicate.

  • Between applications on the same machine, use the Named Pipes binding.
  • Between applications in the same company, use the TCP binding.
  • Between applications across the internet, use the Web Service binding.

EDIT: Heck, even if you weren't using .NET the Named Pipes, TCP, Web Service trillogy is still your default list.

Jonathan Allen
Should I host the WCF service in a Windows service, or can I treat a WCF service like a Windows Service.
InTheFlatField
The Windows service "hosts" the WCF service. IIS is also an option for this.
slugster
I often host one or more WCF services with a Windows Service. In fact, 90% of the code I write professionally follows that model.
Jonathan Allen
I decided to go with a WCF service for my configuration subsystem, and a DataContract for the actual config file. The WCF service is hosted in the windows service I was using for db maintenance before. Thanks guys.
InTheFlatField