Apr 2, 2007 0
Release 0.1h
0.1g was broken -- please download this release.
What's new in Alpha 0.1h:
- Alpha 0.1g had old versions of the SwfCompiler and SWX gateway. This release fixes that. It should now function as per the docs.
Apr 2, 2007 0
0.1g was broken -- please download this release.
What's new in Alpha 0.1h:
Apr 1, 2007 10
There are major API changes in this release. Please make sure that you read the release notes below.
What's new in Alpha 0.1g:
Starting with 0.1g, you are no longer limited to sending a single argument to your server-side service class method. Previously, you would set the data property on your data holder movie clip and this would be sent as the first (and only) argument to your server-side method. This meant that existing service classes (for example, ones you had already written for Amfphp or classes in third-party public APIs) would have to be re-written. Of course, we don't want that. We want to be able to use existing service classes without changing them and that means that we need to be able to pass any number of arguments. Starting with 0.1g, you can.
The data property has now been replaced with the arguments property to reflect this change.
Set the arguments property on your data holder movie clip to the array of arguments that you want to pass to your server-side method.
For example, if the method signature for your service method is getDirectMessages($user, $pass), your arguments array would look something like:
dataHolder.arguments = ['aral', 'mypass'];
In this example, SWX will call getDirectMessages('aral', 'mypass') on the server.
Here is how the echoData sample looks now.
Flash:
import org.swxformat.*; var myData:Array = ['data', 'to', 'send']; dataHolder.serviceClass = "Simple"; dataHolder.method = "echoData"; dataHolder.arguments = [myData]; Prepare.forPhp(dataHolder); dataHolder.loadMovie("http://a.com/path/to/swx.php", "POST");
PHP:
class Simple { public function echoData($data) { return $data; } }
The introductory SWX post has an extended version of the above example, including comments.
Mar 31, 2007 4
Mar 31, 2007 0
What's new in Alpha 0.1e:
This release introduces a slightly modified workflow for working with SWX. I don't believe that it is more complicated though (and may even be clearer.) I really liked how clever the auto serializer was but, as others have noted, and as I had mentioned previously myself, overriding the toString() method of core classes like Object, Array and String can lead to side-effects in some instances. I was using this as an easy stop-gap workflow but it appears that people got stuck on this point and couldn't see beyond it so I've introduced the manual serializer.
The main additional complexity is that now you have to manually prepare the data for the back-end using Prepare.forPhp(). You must do this every time the data changes, before using loadMovie().
Get SWX Alpha 0.1e from the download page.
Mar 30, 2007 4
What's new in Alpha 0.1d:
What's new in Alpha 0.1c:
What's new in Alpha 0.1b:
Get SWX Alpha 0.1d from the download page.