Flex News , Links & Resources

AMF versus SOAP

Posted by: arunbluebrain on: December 6, 2008

What is AMF?

AMF is a binary format based loosely on the Simple Object Access Protocol (SOAP). It is used primarily to exchange data between an Adobe Flash application and a database, using a Remote Procedure Call.

Each AMF message contains a body which holds the error or response, which will be expressed as an ActionScript Object.

AMF was introduced with Flash Player 6, and this version is referred to as AMF 0. It was unchanged until the release of Flash Player 9 and ActionScript 3.0, when new data types and language features prompted an update, called AMF 3.

Why AMF over SOAP?

Though SOAP has become the standard for web services across the web, there are various alternatives. My full-time employer, andCulture, gave me the task of researching alternatives to SOAP for improvement of current and future client-side web applications utilizing the flash platform.

Having had previous experience with many different approaches to flex/flash remoting, I immediately turned to AMF. To make the point clear, I whipped up a quick Flex application that handled requests from two different web services. The first webservice was an ASP.NET SOAP Webservice and the second was an ASP.NET AMF3 Webservice. Each service utilized the same methods and value objects/descriptors. The results were dramatic!

AMF versus SOAP

* Take note of the payload size of AMF and SOAP at a descriptor count of 140.

How do I get started with AMF?

Being a PHP developer at heart, I have extensive experience with the AMFPHP project. From the removal of the method table to the addition of the flex service browser, the AMFPHP package is light-weight and has little overhead. At the same time, being that Adobe has moved toward Zend as the standard for AMF, the AMFPHP project has since died (R.I.P.).

Keeping AMFPHP in mind, I did research into ASP.NET solutions for AMF flash/flex remoting. After looking over the various options, I found the FluorineFx package.


FluorineFx

The FluorineFx package is an ASP.NET library for .NET 1.1, 2.0, 3.5, and Mono 1.2.4 for Flex, Flash, and Silverlight Remoting. This package combines my favorite aspects of AMFPHP, previously mentioned, and ASP.NET/Visual Studio. Here are a few highlights:

1. Flex Service browser – If included, you can simply use http://www.your-domain.com/website/Fluorine.aspx and browse your existing services, generate code, and test methods.

2. AMF0 and AMF3 support – Fluorine supports both the new actionscript 3 format and legacy formats of AMF.

3. Upcoming Flex Visual Studio wrapper – Yeah, I said it! They are developing a wrapper for VS that will enable recognition of flex projects in VS!

4. Code generation templates – The 1.0.0.15 release of FluorineFx (installed via setup.exe found on site) includes a few templates for generation of cairngorm templates and general code for the foundation of your flash projects. The version found in SVN contains support for extension of these templates (http://code.google.com/p/fluorinefx/).

Note: If you attempt to build from source, make sure to generate and assign new keys to the appropriate projects (ex. fluorine.snk).

5. New project types for Visual Studio – After installing FluorineFx, you will find new project types in your Visual Studio interface. Similar to the current workflow for SOAP services in VS.

There are many other features offered by the FluorineFx library and I encourage you to head on over to FluorineFx.com!

2 Responses to "AMF versus SOAP"

The application dev team at my company use .NET, and I’m looking to recommend the most comprehensive, reliable library with the most accessible support.

FlourineFX looks good, but i’m wondering if you’ve also checked out WebORB (http://www.themidnightcoders.com/products/weborb-for-net/overview.html)

Would love to know your thoughts.

I think WebORB is not an opensource unlike FluorineFX which is for free.

Leave a Reply

Categories

Blog Visitor Clicks

  • 80,484 hits

See by Date

December 2008
M T W T F S S
« Nov   Jan »
1234567
891011121314
15161718192021
22232425262728
293031  

Flex Hackr

my Delicious Links