I’m working on a RESTish server project that responds to HTTP requests in a variety of formats. This allows us to write user facing applications and retrieve whichever format seems most convenient at the time. For example, to see if there is a user logged in, we can send:
http://serverurl/Authentication?command=whoami&format=xml
As you can imagine, this returns XML that contains information about the logged in user (if any). We can get the same information back in json:
http://serverurl/Authentication?command=whoami&format=json
Recently, we’ve been discussing adding support for yaml, since it’s popular with some ruby and python developers. At the same time, we have been talking about writing a prototype client application in Flex (which, if you can’t tell from my question, would be our first foray into Flex development). I do understand that we can use one of our existing formats to communicate with a Flex app, but if we decide to add support for these additional formats ‘just because we can’, is there something that would make using amf especially difficult or different from outputting xml or json?
AMF is an RPC (Remote Procedure Call) format, much like SOAP, but with a different target audience. Since there’s a fundamental difference between a procedure call and an object, AMF is not going to be just another output format for you.
You should probably think of AMF as ‘Flex Remoting’ and not as an output format targeted at Flex using your REST API.
To make an analogy: would you think of SOAP or XMLRPC as just another output format for a REST API?