Monthly Archive for April, 2007

SWX Alpha 0.2.1 Release

SWX Alpha version 0.2.1 is now available for download.

The big new feature in this release is compression. SWX files are now compressed by default. You can set the compression level of the SWX gateway by modifying the compressionLevel setting in the SWX configuration file (php/swx_config.php). Valid values range from 0 (no compression; fastest) to 9 (maximum compression; slowest).

Otherwise, the only other addition to this release is a very simple Flash Lite 2.1 example. POST appears to be broken in loadMovie() in Flash Lite 2.1 so make sure you use GET instead. This is not a huge limitation as the amount of data you send from the client to the server in mobile applications is usually quite small and should fit within the limits imposed by GET. However, I have already brought this issue to the attention of several people at Adobe at FITC and I will be working with them to make sure that this gets fixed in future versions of Flash Lite.

SWX Analyzer Apollo Version

An Apollo version of SWX Analyzer is now available so you can run the analyzer as a desktop app on OS X and Windows.

This will be part of the next release but in the meanwhile, you can install it separately: swx_analyzer.air.zip.

Noate: You will need to have the Apollo runtime installed to install the AIR file. I also zipped it up because Safari wasn't downloading the AIR file correctly (it just displayed its contents).

SWX Alpha 0.2.0 Release

SWX Alpha version 0.2.0 is now available for download.

SWX 0.2.0 is another huge release and brings with it cross-domain data exchange as well as an API change.

For a comprehensive review of this release, see this blog post on aralbalkan.com.

Please read the release notes below for a full list of changes in this version.

  • API change: Prepare.forPhp() has been replaced with SWX.prepare(). See the updated introductory blog post on SWX for usage examples.
  • You can now do cross-domain data exchanges with SWX. If you want to disallow cross-domain access to your data, set the allowDomain paramater to false in the swx_config.php file (php/swx_config.php).
  • Added PowerPC support. Should now work on older (bi-endian) Macs.
  • The SWX analyzer now also works across domains. This means that once open, it will display data loading from any domain, local or remote.
  • GET support was broken on SWX gateway. This has now been fixed.
  • SWX now uses JSON instead of PHON when serializing arguments sent from the client to the server.
  • Fixed setVariable (bytecode) bug and removed respective workaround in SWFCompiler class.
  • Tested with PHP versions 4.4.2, 4.4.4, 5.1.4, 5.1.6, 5.2.1. Confirmed to *not* work with the PHP 4.3 branch (this branch and earlier versions are not supported.)

Heads up: SWX 0.2 is almost ready!

SWX 0.2 is almost out the door (I'm aiming for tomorrow) and this is going to be another huge release.

Here are the top three changes coming up in 0.2:

  • SWX now works across domains. Among other things, this means that, starting with 0.2, existing APIs can support SWX. If you want to, you can turn this behavior off using the SWX config file.
  • The SWX Analyzer works across domains too so you can easily debug remote calls as well as local ones with a single instance of the Analyzer.
  • We bid goodbye to PHON and say hello to JSON.

There are other changes too. Among other things, GET was broken since the API change from className to serviceClass and is now functional again and I've fixed a couple of bytecode-related issues.

I've updated the Twitter examples on my blog to use the new version and I aim to release 0.2 tomorrow.

The release after this one (the last one before FITC) is going to be a big one too so stay tuned! :)

PHP 5.1.2 issues

Alex Silver alerted me that the SWX tests were failing on PHP 5.1.2 (thanks, Alex!) and I'm working with him to fix it. (It appears that the binary pack/unpack methods have been quite unstable between PHP releases. I'm guessing not many people use them.)

Once Alex confirms that we have a green bar, I'm going to issue an interim 0.1.9.1 release. In the meanwhile, know that SWX will fail with PHP 5.1.2 until a fix is released.

The versions of PHP that SWX is known to work with are 4.4.2, 4.4.4, 5.1.6 and 5.2.1.

If you have a green bar on the SWX PHP unit tests and are running a different version of PHP, please do let me know by leaving a comment here.

Also, if you notice failing tests on your system, please send me a screenshot and, if possible, the contents of your PHP error log. Thanks!

Peek at upcoming release and a note for linux users

I just wrote up a short blog post on what to expect in the 0.2.0 and 0.2.1 releases.

Also, for Ubuntu/Linux users, Folkert Hielema sent me this bit of information that may help:

With Apache/2.2.3 (Ubuntu) PHP/5.2.1, make sure you have curl installed (the Twitter examples use curl.) If Apache is installed with command line you should add the curl package. For Ubuntu that's (for PHP 5): sudo apt-get install php5-curl

SWX Alpha 0.1.9 Release

SWX Alpha version 0.1.9 is now available for download.

This is a major release that brings with it Amfphp compatibility, PHP object support (see notes), new sample apps and improvements to the SWX Analyzer and to the documentation.

For a comprehensive review of this release, see this blog post on aralbalkan.com.

Along with this release, the version numbers for SWX have changed to major.minor.revision format.

Please read the release notes below for further changes.

  • Added Amfphp to the build.
  • SWX now works with Amfphp services (except those that return RecordSets). Fixed include path mismatch with Amfphp in service class includes, which was the only remaining issue.
  • Added interim workaround for object support (they are converted to associate arrays).
  • Added History Panel to SWX Analyzer.
  • Added SWX Twitter Badge sample app
  • Added SWX Twitter Stream sample app
  • Updated SWX gateway path for Flash examples. They now use http://localhost:8888/php/swx.php. This is in preparation for the MAMP bundles in 0.2.1).
  • Added config file SWX to allow custom services folder.
  • Integrated SWX config file with globals.php in Amfphp.
  • Renamed Amf gateway to amf.php (from gateway.php) to be consistent with other gateway naming conventions.
  • Changed include_once statements to include statements to decrease load.
  • Changed Analyzer and service browser to use UFO
  • License information added to build and start page
  • Started the move to friendlier end-user documentation (very early stages)
  • Added basic error checking to SWX Analyzer.
  • Tested with MAMP 1.4.1
  • Updated to work on (and tested with) PHP 4.4.4

Enjoy, and don't forget to have fun! :)

SWX Licensing: In plain English and legalese

I've gotten a couple of questions asking about how SWX is licensed. I want to first answer this question in plain English as it concerns you, the Flash developer, before getting into the specifics.

A brief outline in plain English

The short answer is that SWX is open source. The source code that concerns Flash developers is licensed under the MIT License. The SWX server itself is licensed under the Creative Commons GNU GPL License.

What this means to you:

As a Flash Developer, you can freely use SWX to build and deploy both personal and commercial Flash projects. You can modify and build upon the sample applications and examples that come with SWX, and those you can find on my blog and on swxformat.org, provided that you give proper credit and you do not modify the copyright notice in the code.

If you are interested in the minutiae of the actual legalese, read on, and, if in doubt, always consult the actual license documents themselves.

Continue reading 'SWX Licensing: In plain English and legalese'

Real world data

You can build test cases all you like but real world data will break things. That's something I learned a long time ago and it's still true.

Today, I started building a simple Twitter application with SWX and ran into two issues. Firstly, SWX doesn't currently support PHP objects (it supports associative arrays). This wasn't a problem when echoing data back to Flash since data sent from the Flash client is always serialized to an associative array currently (not an object) but, the moment you feed data from another source, such as the JSON parser in Amfphp, that *does* spew objects... well, it breaks.

To-do: Re-implement object support. (I had it in there initially but then removed it.) Update: I just implemented a workaround for the time-being that converts objects to associate arrays. I do want to look into actual object support in the future, however my focus at the moment is to get SWX to the point where we can build mashups, etc., that use *existing* service classes that are compatible with Amfphp.

The other thing is that something in the returned data from Twitter is breaking the assembler. I'm looking at that now and will post a new release once I've handled it. Apparently, this was just a side-effect of the object issue I outlined, above.

In your own testing, if you notice SWX break on real-world data, it would help me greatly if you can send me your source so I can recreate and fix the problem. Running a tail on the PHP error log will help you see the errors that SWX throws (sending me this output, along with the source will be much appreciated!)

Release 0.1h

SWX Alpha 0.1h is now available for download.

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.



Bad Behavior has blocked 2979 access attempts in the last 7 days.