6

I am working on building an iPhone application that uses an external server to store most of the data. The server exposes all the required services using a REST API.

Ideally I would like to generate the client side code in objective-c that can consume these services. Preferably these should return objects that I can easily use instead of having to parse the return XML.

What options am I looking at ? I have researched quiet a bit on this and the closest to code generation I have seen is wsdl2objc . Since I also own the backend services I could make them SOAP based services, but I really prefer not to do that since I will later on use the same set of services to build a Web UI ( for eg). Other option I have is to go with RestKit.

Any guidance on this is much appreciated. I am pretty sure this is a use case lots of people have faced and I just am not able to find the right resources or am not looking at the right places.

Cheers !!!

Vidyanand
  • 967
  • 8
  • 14

2 Answers2

5

RestKit is a great framework. You're still going to have to write code, but it will make the process of moving data between Cocoa models and RESTful/JSON web services elegantly straightforward. I recommend running through the examples to get your head around their way of doing things.

jmans
  • 5,648
  • 4
  • 27
  • 32
  • RestKit was my first choice given all the choices I have. It is good to know that others too think this is the one framework to use REST based iPhone apps. – Vidyanand Apr 14 '11 at 10:05
  • it would be great if you could put your thoughts on my question on [how to use RestKit](http://stackoverflow.com/questions/5661842/best-way-to-use-restkit-in-an-iphone-application) – Vidyanand Apr 14 '11 at 10:28
0

Agreed with using ResKit, which allows not only to ease REST services consuming, but also mapping to CoreData and others if I remember well.

And about CoreData I would suggest using Mogenerator that intended to generate CoreData code, but it is also allowing more, since it can basically be used as a template based code generator from CoreData Models...

A good match to your question could be some Mo' templates filling the gap between both.

Vincent Guerci
  • 14,379
  • 4
  • 50
  • 56