开发者

What are the easiest data-interchange formats for a web service that will have Cocoa and JS clients?

I have a web service that I want to build a Cocoa client for. But first, I have to rebuild the web services on a more modern and robust framework. However, it seems prudent that I should be thinking about the upcoming Cocoa version during this process.

It seems all the cool kids these days are building APIs for their web services, and then dogfooding their own APIs for use with their own web/html/js and Cocoa/Android/etc clients.

So, if I was to take this approach, is there a particular data-interchange format that is conducive to both web and Cocoa, e.g. JSON, XML?

I'm pretty affluent in PHP/CodeIgniter, JavaScript/jQuery. Between those and the upcoming Objective C/Cocoa work I'll need to do, is any one of these interchange formats intrinsically easier to implement, e.g. has better CI, jQuery, or Cocoa framework support?

UPDATE:

The kind of information going back and forth will involve synchronisation of a database global to every user of the service (3-开发者_Python百科8K records, 15-20 fields each) as well as records individual to that users (10-3000). Therefore, the first synchronisation will be quite large, but successive ones a bit smaller.


I've been using JSON as the standard interchange format for simple data. XML is typically an overkill for relatively simple data. JSON has perfect support in jQuery, good support in PHP, and plenty of Objective-C/Cocoa libraries to get it transformed into an NSDictionary or NSArray object (and back).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜