Iphone – [iPhone and Web Services]: REST vs SOAP

iphonerestsoapweb servicesweb-applications

I've started my degree project, a mobile application suitable for iPhone, Android and (in the near future) Symbian. The server architecture is the following:

  • web site (for "standard" users);
  • web service (for mobile connections), based on TomCat and Axis2;
  • mySQL DB to storage users data.

Surfing across the web, I've read a lot of discussion about the interaction between the iPhone and Web Services, and I've to say that I've not a clear idea of what I can do and what not.
Let's start from the protocol used to retrieve data from the DB: the Android-side application uses SOAP protocol, can I do the same with iPhone? Are there some limitations or problems?

I have also read about the using of REST instead of SOAP, could it be possible with the server architecture described above? Which are the main advantages/disadvantages?

Sorry if these questions sound "n00b", but it's my first real experience with iPhone and the lot of informations found on the web messed up my mind and I'm scared to be confused. Forgive me for any error.

Best Answer

SOAP is simply too heavy for mobile communications. Why do all the work to wrap requests in an additional XML layer you'll have to parse? You send more data than you need to, and impose greater CPU burden on client and server.

Use REST. If you are doing a cross-platform project JSON makes a great payload container, otherwise plists work well for sending data from the server.