Wednesday, August 4, 2010

Talking with iOS

In this article we will summarize some of the best practices and technologies we have identified to implement a scalable and manageable communication framework to integrate iOS base devices into an existing enterprise application, typically developed using Microsoft technologies.

Selecting the communication protocol

When we need to communicate with an iOS device (or any other mobile client for that matter), one of the first things we need to decide is the protocol to be used during the communication. Although we can use our well tested SOAP over HTTP for this matter, given the limitations of these devices, it’s always better to have something simpler and more efficient. Considering this requirement, the REST (Representational State Transfer) web services become the ideal choice for this matter. In REST, we think in terms of “resources” instead of “actions.” Therefore, rather than defining our own methods, REST leverages the existing methods of an application layer protocol (e.g. HTTP) to manipulate the resources. This avoids the need of having special client side “proxy” classes to perform the communication. For instance, if we want to get a list of users, using a REST service, we will simply perform a HTTP GET request to a pre-defined URI (e.g. and to update the users we may perform a HTTP POST request where in SOAP based web services, we will invoke web methods with the help of a proxy.