The Back End – Why Remoting is Better…


The back end for most of my flash portfolio is using AMFPHP Flash Remoting. It’s a free library that came out years ago. I still like it because its performs well and is easy to install-just edit some configs and upload. It’s been a great journey into PHP/mysql as a back end for AS3, and has allowed me to make several RIA’s (Rich Internet Applications) on my own.

For Flash based apps that use a back end, I like Flash Remoting better than JSON, AJAX, REST services, or server side generated xml. I have an opinion on this because I’ve used all of them. Here’s my reasons:

  • Flash sends and receives native Flash objects with any level of hierarchy and complexity. For example, an array of objects containing strings, numbers, and other objects containing arrays of objects. This leads to the next point:
  • No serialization or de-serialization is required, ( the information received is Flash native ). For example, in AS3, you might access your returned data with “response.people.id[7].areaCode
  • It’s faster because it’s compressed binary, rather than large uncompressed strings
  • It’s faster because it’s socket layer communications, rather than standard http requests

Also, for some speed demo on this, see James Ward’s benchmark.

I know that this particular implementation of Flash Remoting might not suit the needs of a large, enterprise based back end – but there are enterprise level remoting solutions out there. Several flavors are available, not only with PHP, and not all opensource. I’ll post some links of these:

Adobe Live Cycle ( JAVA )

WebORB (.NET, JAVA, PHP, Rails)

Adobe Flash Media Interactive Server

BlazeDS ( JAVA )

Zend AMF ( PHP )

Leave a Reply

Your email address will not be published. Required fields are marked *