Brett Allen
Brett Allen

Reputation: 5477

Recommendation for a .NET Desktop Client using a PHP web backend?

We have a project to integrate a .NET Application client that will communicate with a back end server over HTTP using PHP.

I've been looking at our options and I've come to two possible development scenarios:

  1. Use GET or POST parameters to the PHP back end, and returning responses using JSON or in some other format that .NET can easily interpret.

  2. Implement a .NET compatible PHP Web Service framework.

The first one would seem to be far simpler to implement, but might have some complications down the line, and I'm still not sure what format would be easiest to implement. Only one I've done before is JSON.

The second option seems to be the "correct" way to do it, but is not something I've attempted before and unsure what the best way to proceed is.

My questions are as follows:

What is the standard way to implement such a solution?

If option 1 is the recommended way, what is the best format for serializing the data being return?

If option 2, what is the recommended framework to implement this solution and is there a tutorial that could be followed to ease implementation?

Upvotes: 1

Views: 153

Answers (1)

Brad
Brad

Reputation: 163234

In the past, I've always gone with option #1, serializing objects to JSON. While you certainly can create an XML-RPC interface in PHP, and there are even some solid base classes for doing so, I've found it to be too difficult to work with.

Meanwhile, there is a really solid class for handling JSON in .NET, and it even supports LINQ!

http://json.codeplex.com/

Upvotes: 1

Related Questions