anotherCoder
anotherCoder

Reputation: 732

IOS App communicating with web services

Here is what I want to accomplish:

  1. On server side, I basically have a table with values, such as,

    A | 0
    B | 0
    C | 1 etc.

  2. On the client side, I've an IOS App, which downloads the contents from the webpage and displays it in a TABLE view. These values can also be changed and submitted. And once submitted the webpage must also update to the new values.

So to accomplish this,

  1. What is the best server side format I use, like, JSON, xml, plain HTML??
  2. On the client side, is this possible at all to change and submit the new values??
  3. Please suggest any tutorials or starters to go ahead with this framework.

Upvotes: 1

Views: 999

Answers (2)

Siba Prasad Hota
Siba Prasad Hota

Reputation: 4789

You can Use either JSON/xml as response. And you have to Create webservice using PHP,Mysql which will be hosted in your server.So you will send the request to that PHP file Hosted in server to enter or Update any data in MySql database.

here is a nice tutorial from Raywenderlich

Upvotes: 1

Jasper Blues
Jasper Blues

Reputation: 28756

  1. Either JSON or XML will be fine. JSON is a lot more popular these days. There are numerous JSON parsing libraries, but for your case the built-in support will be perfectly adequate.

  2. Yes, of course. I suggest making true model/domain classes and parsing the server data into the model. You can then manipulate the model on the device. When submitting back to the server, go in the other direction and marshal the model back to JSON.

  3. I suggest Working with Json in iOS, A Ray Wenderlich Tutorial . . there are many others, probably also just as helpful.

Upvotes: 2

Related Questions