I'm building an Iphone application, which has to retrieve information from a database on a server. I thought about building a C# web service on the server, so the Iphone app will send a http request to the web service and get the required data as a xml output开发者_运维问答. Are there any better alternatives? for instance: I never tried but heard about WCF, maybe it's better using it instead of the older xml web service technology?
Thanks, Benny
I strongly recommend you use WCF Data Services / oData. It's easy to implement and really flexible, allowing for atom and JSON REST queries. There is also a native iPhone sdk available at the official site http://oData.org.
Yes, WCF is the recommended way of building Service Oriented application. In your case you might want to build your service as RESTFul as well. And anyway,building it using WCF would make it available to any client.
And here is a link to learn the basics of WCF services with Samples. Windows Communication Foundation (WCF) Samples
精彩评论