Wednesday, March 01, 2006

Flash Remoting and AMFPHP

I've been a big fan of using Remoting to connect Flash to servers for a while now. A few years ago I started out using Flashorb when I was building the site.

FlashOrb is an excellent product that supports Java and .NET remoting. It has since been renamed WebOrb and now supports Ajax services as well. If you've used Macromedia's .NET remoting product you'd love WebOrb. It works much more smoothly and you can skip a lot of the steps that you need with Macromedia's product. It is often possible to just create classes that can move transparently back and forth from the server to Flash without having to create helper classes like you do with the Macromedia version.

If you aren't familiar with remoting it is basically a flash specific binary version of SOAP. It is more compact than SOAP/XML and the data moves across in a native way so you can skip the XML processing on the flash side. The data just comes in ready to use.

Lately I've been doing most of my development in PHP rather than .NET or Java. Most of my current work is CMS oriented and I have been using Typo3, a PHP for a lot of that work. Rather than building the sites with multiple languages or frameworks I switched my remoting to AMFPHP an open-source PHP remoting product. It's been working great and has been fairly easy to integrate in with typo3 managed data. They recently releases a 1.2 beta that adds several new features that are really impressive. Once of the biggest is direct support for the ARP Flash Framework. The other is a new service browser that lets you test your services through simple html forms without having to build a flash app just for testing. I've had problems getting that to work but I have high hopes for it. I suspect it is a configuration issue since the services themselves work fine.

ARP is a MVC framework for remoting driven flash apps. It is a set of abstract classes that you extend to structure your flash app. The new version of amfphp actually generates a lot of the connection code for you to cut-and-paste into a flash class to connect your ARP app to remoting services. The biggest hassle with ARP is getting that all the initial code setup and this makes it incredibly easy. Like any framework, ARP seems like a lot of extra work up front but pays of huge in late development so anything to make those first steps easier is wonderful.

The ARP/AMFPHP connection is still new and in beta but I think this is a huge development that combined with the plans for ARP 3.0 will result in a Rails-like simplicity and speed of development. I'm looking forward to it!


Anonymous cyprian said...

how can I get in touch with you?
regards, cyprian

5:00 AM  
Anonymous Anonymous said...

Hey Dude!

need to get in touch with you regarding the amfphp<>typo3 integration. Have you deployed a extension?

Can get me via ff [atttt] 2raum-fabrik [doottttt] de


3:33 AM  

Post a Comment

<< Home