WPF app + PHP,最快的沟通方式

Hello may be you can help me. I'm wondering about the fastest way to send and receive information between a WPF App (client) and a PHP (web hosting server).

Is TCP with sockets the way to go? or it'll have problems with the firewalls and IT related stuff?

Do you recommend me to go for a REST PHP version?

Webservices?

I would like to connect this two technologies in the fastest way without enviroument restriction (like the firewall or IT stuff).

Really, anything that uses HTTP on standard ports would probably work. At least, as well as it would be able to behind a firewall.

So that leaves your options open. Here's a few ideas:

  • Use JSON and normal HTTP requests.
  • Use XML and normal HTTP requests. (this may be a bit easier for the .NET side)
  • Use SOAP.
  • Use XML-RPC.

Pick one. The first two are easier to implement on the PHP side, and relatively easy to implement on the .NET side. SOAP is fairly easy to connect with .NET; I'm not sure about PHP SOAP libraries. XML-RPC is somewhat hard on the .NET side, and I'm not sure about the PHP side either.