views:

52

answers:

1

I am looking to develop basic client server data application to add value to a website.

The website is .net based and opening an api such as asmx web service, json or xml would be simple.

Can anyone tell me what are the limitations - technically, what is possible with flash and also what Apple consider to be good practice.

Does anyone have any Actionscript code examples?

+1  A: 

I don't think anything with Flash involved is considered "good practice" by Apple...

Kidding aside, I would go with JSON, it fits ActionScript well, since ActionScript is based on ECMAscript. That JSON has less overhead than XML can also be a good thing on a phone (less bandwidth).

Working with XML is easy in ActionScript since it has E4X, but if you should at a later stage switch to Objective-C/Cocoa, I believe JSON is betters suited than parsing XML.

What you should probably avoid is setting up a SOAP web service. In my experience, it may look as a tempting option on the .Net server side, but is cumbersome to work with on the client side, in scripting languages like ActionScript (and SOAP has a lot of overhead).

All this said with reservation for that I haven't done any development for the iPhone using Adobe's Flash CS5 packager for iPhone.

Lars
Thanks Lars, I cannot seem to find anyone who has done any real iPhone dev using CS5. Which is surprising despite the false start as there are (were) a lot of Flash devs out there and a lot of hype over this feature in CS5.
Desiny
The biggest advantage of JSON is that it easily maps to Foundation types (NSNumber, NSString, NSArray, NSDictionary); you store data in JSON almost exactly as you would in a plist (the biggest difference is that a plist also supports NSData and NSDate). XML parsers tend to be stream-based, which is fine if it suits your processing (XSLT) but a bit silly when you just want to load the whole thing into memory anyway. SOAP is more like COAP or OOAP...
tc.