The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


REST Resources for Flash Developers

Posted by stoicflame on March 13, 2009 at 3:14 PM PDT

Over at FamilySearch, I've been involved in supporting Flash application development that consumes a public POX API. It's not a REST API, but like REST, we provide a set of resources that are accessible at a given URI. Up to this point, our Flash developers have been stuck with parsing the resources as XML. It works fine, but it's not without a significant overhead. XML isn't the most efficient data format, nor is it very convenient to work with in ActionScript code.

The "native" data format for flash development is AMF. When ActionScript objects get written to a stream, they are serialized as AMF. When the objects are read from a stream, AMF is the presumed deserialization format. The Enunciate project has provided support for supplying SOAP endpoints as AMF services for quite some time now, but I've only recently added support for AMF REST endpoints.

Here's the wrap-up of the process. As mentioned in the article, if you're already using Enunciate, this process will be significantly simpler. Enunciate already comes with a JAX-RS provider that does the serialization and it will generate your client-side ActionScript classes for you. Not to mention the fact that Enunciate will also generate documentation for your API and neatly package it up, ready to be deployed into your favorite servlet container.

http://docs.codehaus.org/display/ENUNCIATE/AMF+and+REST

Related Topics >> Web Services and XML      
Comments
Comments are listed in date ascending order (oldest first)