Rough draft of notes
Aral Balkan is talking about SWX.
Some post lunch jumping to capture a room of a full of people in the air yelling SWX.
Aral likes to consult, speak, and teach about user experience design, development processes, and software architecture. Works primarily with Flash, Flex, and a focus on open source. Founded osflash.org. Currently working on SWX.
SWX: Native format for Flash.
SWX RPC: RPC protocol encoded in SWX.
SWX PHP: PHP backend for SWX.
SWX Tools: Service Expolkire
SWX AS Lib: Optional, high-level AS library that handles SWX RPC calls.
SWX APIS: APIS for Flickr, Twitter
Public gateway: Open SWX RPC endpoint
Why SWX: Issue with existing data formats.
loadVars, loadVariables: deserializing string is complicated, it's plumbing, should be handled for you
XML: What data structure is being loaded, first child, last first, what child
Remoting: Created SWX because of remoting. Go to Adobe and search for remoting classes. Barrier of entry is too high. Doesn't work with Flash Lite.
SWX just works. SWX is easy. swxformat.org
Demo of Services Explorer: Test services installation of PHP SWX Services.
Launch Data Analyzer, Launch Flash, AS 2 FLA: Create MovieClip named loader, In actions panel:
loader.serviceClass = "Flickr";
loader.method = "swxPhotosGetRecent";
loader.debug = true;
Data Analyzer has data that was returned. Creating second MovieClip called image:
onEnterFrame = null;
swxformat.org/faq/ for information about Flash IDE Sandbox warning issue
swxformat.org/download (SWX ActionScript library) comes with classes and examples.
var swx:SWX = new SWX();
swx.gateway = "http://swxformat.org/php/swx.php";
swx.debug = true;
var callParameters:Object =
method : "swxPhotosGetRecent",
result: [this, resultHandler]
var imageSrc:String = event.result.photo.src;
Currently this only works with AS2.
How to create your own service side class. SWX MAMP Bundle to work with PHP on a Mac allows working with things easily. One click run on Mac, just download ZIP for Windows or Linux if you have a running web server with PHP.
HighScores.php SWX services example
return array('Branden', 'Mario', 'Chafic');
Changing example from above:
swx.gateway = "http://localhost:8888/phph/swx.php";
// updated resultHandler
var names:Array = event.result;
for (var i=0; i < names.length; i++)
display.text += names[i];
TextField component called display
FlashLite 2.0 and 2.1 are supported.
Showing demo of miniflickr using CS3. Trying to demo it on his Nokia N95 (couldn't get network).
Showing application with SWX that pulls Twitter data.
SWX Ruby (Locomotive one click Mac installer for Ruby)
creating swxrpc ruby application. Line of code to install SWX Ruby.
Showing example using Ruby service, same loader calls.
SWX uses: Mashups for Flickr, Twitter, Jaiku, Numpa, Nabaztag, etc.
Flickr API: current, MIT license, upload, actively maintained
Mobile applications: Limitations no POST. DeviceCentral doesn't support LocalConnection.
Games, Kiosks, CDs, Wrap it with AIR (Twimpa is an example)
SWX has a showcase on swxformat.org
AS2, Flash 6+, Flash Lite 2.0, 2.1 Mobiles, Wii, PS3, PSP, Chumby
Soon: AS3/Flash 9
Roadmap: Writting RFCs for SWX and SWX RPC, bundles for other platforms, more APIs.