Reputation: 8918
Basically my iPhone app needs to exchange data with web server - i have a list of people (names, address, etc..), and iPhone user can get this list from sever, modify it and then again send it to server.
Since i have done little/to no web communication regarding iPhone, where is a good place to start, basically where to start?
Upvotes: 0
Views: 370
Reputation: 1484
Web Services is the thing you wanna research on. There are tons of tutorials you can googled and they are not very hard to implement. there are different kinds of web services you can use, and you wanna choose one based on what server side technologies you have and how complex your data could be traveled in between.
In my situation, I have asp.net on iis server. Since my company has a lot of legacy code and we wanna our app to be available for our apps on different platforms, we chose SOAP, and that based on POST.
I manually parse xml on iOS side and store information in a local sqlite database.
I am sure there are better things I can choose. Jason is a very good choice and there are some third party Jason parser available. I also wanna use WCF.
In your situation, like I said, the server side technologies is what you wanna think of before you make your decision.
Upvotes: 1
Reputation: 686
I hope this is what you were looking for. If so, this topic is fairly common. Disclaimers apart, I would break this problem down to three parts, which would then determine the final approach you might want to take.
1. Resources
You need to choose from
Self hosted services - from your/your client's own services
Cloud based services - There are a few approaches here.
a. Heroku/Appengine - Where you deploy your application and they care of the rest.
b. Amazon EC2/AWS - where you manage application deployment/scaling etc
c. Parse.com - where the "webservice" is sorta controlled by your client application.
2. Technology
Well this is fairly straight forward. Each of these platforms use different technologies.. So it all depends on what you can get your hands on and how fast. Although it wouldnt matter now, it also depends on whether you can implement what you want with that technology/solution.
3. Pricing
How much can you shell out? Managed hosting is fairly cheap, self hosting depends on the provides, cloud services may be a bit on the costlier side for a per server basis
Upvotes: 1
Reputation: 510
first be sure what the webserver is sending and receiving. Data from/to server can be received/send in many forms most common are: 1. JSON 2. XML
Try first to learn what they really are. then you can search for various tutorials for JSON and XML integration for iPHONE apps. for JSON the best tutorial ever is: http://www.raywenderlich.com/5492/working-with-json-in-ios-5
Upvotes: 1
Reputation: 2210
As you ask a starting point i will not share code for the moment(i can edit the answer if you want). Firstly prepare your data you want to send to server(i suggest JSON) and if you have a small and non-sensitive data create a GET request to your server and send your data via GET, if you have a big amount of data or you have important(or security related) data create a POST request to server. This may be a starting point, if you need more, and also for JSON this tutorial may be good
Upvotes: 2