Reputation: 967
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 !!!
Upvotes: 6
Views: 1948
Reputation: 14419
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.
Upvotes: 0
Reputation: 5658
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.
Upvotes: 5