views:

169

answers:

3

Hey!

I would like to create a link between a winMo device and a server, so that they can pass information back and forth to each other. I actually don't really know where to start, I've had SOAP, RPC and creating a TCP link suggested to me. If someone could provide a link to an example that would be great.

Thanks!

Thanks for the responses. Updates:

  • It's not critical that the server initiate the communications, I could have the mobile device poll the server
  • timing is not ultra critical
  • I would prefer that it uses some open standard, if I wanted to also communicate with a palm device as well for example.
  • I had the idea that webservices were one way, unless the mobile device runs a server also?!
+2  A: 

Your best bet is to set up an ASP.NET web service on the server, and then have your PDA application talk to it.

You can also use the web service to talk back to the PDA. Essentially, the PDA has to initially call the web service and pass in a delegate method that the server then calls when it needs to talk to the PDA. I do not recommend this latter method, especially in an environment where the PDA is not continuously connected to the network. It's usually better to have the PDA initiate each contact with the server.

MusiGenesis
A: 

I'm setting up a project doing exactly this, and I'm using a web service to do the talking.

You can also access SQL Server directly using sqlClient, synchronize data with the SQL Server 2005 Compact Edition "Remote Data Access" or use SQL Server Merge Replication.

I'm not sure what the differences are between these things, but I got the list from "Microsoft Mobile Development Handbook" by Wigley, Moth & Foot.

seanyboy
+1  A: 

Define "two-way". If you need one end to do initiation, for example the device needs to get data from or send data to the server, then something like a Web Service or a WCF service works well and is pretty easy. WCF requires a lot less overhead and installation on the "server" end (no IIS requirement). If, however, you need the server to initiate the communication, it becomes a much larger problem, as the device is typically not addressable.

Some other considerations you have to look at are your connectivity model (what happens when you're not connected or lose a connection while communicating) and acceptable latency (do I need a response now, or is 5 minutes from now ok?).

The transitive nature of devices makes this a much different problem than PC-to-PC connection models.

ctacke
Thanks that some great things to think about.
Richard