which service response is good for iphone development?
I have to create a web service for iPhone. So I would like to know which web r开发者_StackOverflowesponse is the best for iPhone app developement(SOAP vs REST vs XML vs JSON vs ... any other).
Is there any good example to access webservice for the best web response?
This question is practically impossible to answer because web services have different strengths and weaknesses. There is no one "best" web service for the iPhone.
A better question, perhaps, would be answered by what the best services are for your given application. So, in that light, what are you trying to serve to your phone?
A REST API using JSON
is very lightweight and easy to implement at both the server and client end. JSON is very popular with iPhone developers, and is much lighter weight than XML.
There's a great Cocoa framework for working with JSON:
http://code.google.com/p/json-framework/downloads/list
This may be more of a hint along the way than an actual answer, but there is a good Cocoa XML-RPC framework available under MIT license.
The easiest to handle is probably a REST API using XML for data encapsulation. Cocoa has built-in tools for handling both HTTP and and XML (NSURLRequest and NSXMLParser, respectively).
精彩评论