Reputation: 2351
I'm in the middle of working on my first native application with networking and I have a question regarding the best way for interacting with remote storage. In a perfect world I'd like to do the following.
I've read some similar questions posted, maybe something's lost in translation, but the two most common means I've come across are.
NSURLRequest
and echo the NSData
as XML and parse it with an NSXMLParser
.Are there other options? Is one a better implementation over the other? (web services come up more in searches)
Thank you in advance for taking the time to read my question and possibly clearing up any confusion.
Upvotes: 2
Views: 576
Reputation: 34945
Whoa! Web Services! Oh wait, calling a PHP script that returns JSON is actually also a web service. Well, that makes things simpler :-)
Yeah, so I would go for this:
This way you can use almost all standard components on the iPhone side. NSURLConnection will talk HTTP(S) and there are excellent open source JSON parsers for Objective-C.
Upvotes: 2