tags:

views:

3832

answers:

3

I'm architecting a .NET "web service" and an iPhone application that will consume these services. I'm curious if there are any best practices for architecting the protocol for exchanging data between the two. SOAP-based web services feel too heavy to me for an iPhone app. Perhaps REST, JSON, POX instead? Certainly the specifics of the application dictate the protocol to some degree, but I'm curious what others have done.

Ideally, I'd like to leverage WCF if possible (again, perhaps its REST, JSON, or POX support) so that I can keep my options open for creating other bindings for other client applications in the future.

Any advice would be greatly appreciated.

Thanks.

+9  A: 

We're currently using a WCF based REST/POX service for one of our applications. I would recommend sticking with REST/POX as there are no class generators for web services (that i know of) on the iPhone like you get in the .NET world by adding a service reference. This will make the parsing a lot simpler as you wont have to worry about all the extra junk soap adds to the messages.

Basically take a look at NSUrlConnection and NSXmlParser and read up on "Key Value Coding" (makes the xml parsing a LOT easier) and you'll have everything you need to get it done with a minimal amount of code.

Lounges
A: 

I know RemObjects SDK for OS X

I hope it can be helpful for you.

Hugues Van Landeghem
+2  A: 

Check out this blog post for a quick overview on how to create a WCF service for your iphone app.

jaminto