简体   繁体   中英

Rails 3 and mobile application connection

I want to develop web service app which will be used by mobile app (iPhone and Android). I was investigating a bit, and I found only examples that uses SOAP for communicating. SOAP isn't supported in Rails3, and some libraries like actionwebservice doesn't work in Rails3. On other side, developers says that SOAP is the past, and RESTful is the future. I don't know anymore what to do and what to learn, and I need advice.

What protocols and technologies you suggest me to use? I need something that can handle connection between iPhone app and Rails web app (web service).

I'm biased towards XML.

It's easy for Rails to generate its data, output in XML format, and it's very easy to get and parse XML from the iPhone. This is all done form the NSXMLParser class.

Using the one call:

- (id)initWithContentsOfURL:(NSURL *)url

You can retrieve data from your Rails app in XML format, and read it into an object, then use other member functions of NSXMLParser to parse the received data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM