-
Get a monthly update on best practices for delivering successful software.
I've just completed a project where I was the Rails developer for a site that was integrating a Flex application that needed to pull from a database. A primary consideration is how to transport the data. Rails supports xml and json natively, and is very easy to set up by adding a single line to a controller's respond_to method. Sasha, the Flex developer on the project, suggested that we go with AMF if possible as it's native to Flex and is deserialized straight into custom typed objects.
After reading a bit about some performance considerations it looks like AMF and JSON are going to get roughly similar performance in most cases, so it becomes a matter of ease of development and taste. Sasha definitely preferred working with AMF, so i started checking out Rails implementations.

In a project that I am currently a part of, we inherited Ruby on Rails from our client's system and project front-end was designated to be developed in Flex. RubyAMF came naturally.
I have been working with two other AMF frameworks prior to this: AMFPHP and WebOrb. My experience with both was that they are fairly hard to set up and once you go through that minefield, everything works excellent. No need to say that I am a great advocate of AMF in general. RubyAMF brings the same good old AMF but with a stunning ease and speed of development!
My colleague working on the Ruby side, Justin Ficke, introduced me to code and architecture of Ruby on Rails and I was impressed to see with what ease, precision and speed can one develop it.
Justin and I put a little test together of this architecture and here is a screen cast of it.
All the lovely custom typed objects and speed of data transfer are there. Beauty of it, appart from obvious benefits from AMF, is that the development process couldn't have been better and faster.
Topics: amf, AS3, Flex, Ruby on Rails, rubyamf