AMFPHP 1.9 Beta

AMFPHP

The update to my favorite Flash remoting tools AMFPHP is now available.

New features of AMFPHP 1.9:

  • AMF3 support, including RemoteObject. You can finally use it in Flex 2.
  • JSON support. In addition to gateway.php, there is now json.php which allows you to use your services in JSON as well Flash. Two examples here: MochiKit and Spry. XML-RPC also supported. Details below.
  • A new Service Browser. Try it live here. Notice that the samples.MochiTest service is the same one used by the JSON sample, so you can verify for yourself that indeed it works both in AMF and in JSON mode.
  • The end of $this->methodTable. From now on, $this->methodTable is ignored. All methods are remotely accessible by default.

It’s extremely exciting about the inclusion of Flex support and the additional JSON support. Here is the feature list of AMFPHP with JSON:

  • You can use the same service in JavaScript AND Flash.
  • You can use the service browser to test your classes.
  • Most PHP Ajax libraries mix and match code and presentation in a fashion which makes me sick to the stomach. Amfphp provides a clean way to organize your code and dispatch calls.
  • It will use PHP’s json_* functions if it finds them (built-in in PHP 5.2, available as an extension in older versions), or will revert to PEAR JSON if it doesn’t, so you have an easy upgrade path if you need more speed.
  • It will serialize recordsets directly.
  • It doesn’t have any JavaScript dependencies, so you can use with whatever toolkit you like (prototype, MochiKit, Spry, you name it).

One of my favorite forums Sephiroth.it has a forum based on Flash remoting with AMFPHP.

More information can be found at AMFPHP and 5 1/2.

Leave a Reply

You must be logged in to post a comment.