Archive for the 'swx' Category

CakeSWXPHP – updated to SWX 2.0 beta 1

The first beta of the new version of SWX was released yesterday. This new version brings AS3 and Flash Player 10 support. I decided to update CakeSWXPHP, to support this new version of SWX. You can download a new version, from my CakeSWXPHP page.

Image search service

I had to search for (stock) images today, to include in a presentation. I found myself tabbing through different search engines all the time, so I decided to write an amf/swx service which has methods to search SXC, MorgueFile, Google Image search and Flickr. This way, I can write a flash frontend, which makes my life a little easier.

You can see a simple image browser at: http://labs.aboutme.be/image_search/.

And of course, the server side code is available for download aswell.. You can find the service itself in swx/services/ImageService.php. For Flickr, you will need to have an API key, and enter your API key in the ImageService PHP file.

benchmarking cakeswx/amfphp

Cakeswxphp enables you to use the cakphp rapid application framework as your remoting backend. No longer writing complex sqls, escaping query strings,… As some of you have noticed, cake does slow your remoting down a bit, as more classes are loaded to give you this ease-of-use. I did some benchmarks, comparing amfphp and swx with cakeswxphp 1.1 and cakeswxphp 1.2. I ran the echoData service 10 times, and took the average speed of those calls. These are the results:

SWX: 346ms
CakeSWXPHP 1.1: 350ms
CakeSWXPHP 1.2: 369ms
AMFPHP: 57ms
CakeAMFPHP 1.1: 111ms
CakeAMFPHP 1.2: 126ms

As we already know, AMFPHP is fast as hell. The CakePHP version is 2x slower because of the extra classes & functions cakephp executes. The difference between SWX and CakeSWX isn’t that big.

After that, I turned out eaccelerator (PHP caching / accelerator system) and ran the benchmark again:

SWX: 347ms
CakeSWXPHP 1.1: 364ms
CakeSWXPHP 1.2: 362ms
AMFPHP: 50ms
CakeAMFPHP 1.1: 64ms
CakeAMFPHP 1.2: 67ms

Not much difference between the first results without the caching, except for the Cake AMF gateway: it seems like using a php accelerator makes the cakeamfphp almost as fast as the native amfphp!

I’ve included the benchmark scripts:

cakeswxphp SWX benchmark
cakeswxphp AMF benchmark (AS3)

cakeswxphp: simpler and on cake 1.2

After some user input, I updated the cakeswxphp packages. I also started a branch which supports cakephp 1.2. There is a change in the gateway locations: you no longer connect to cake_swx_gateway.php or cake_amf_gateway.php, but to swx.php and amf.php (default locations in swx). This should make it even simpler to start with (cake)swx!

Again, you can download it at the cakesxwphp page

SWX contest deadline extended

Aral Balkan just announced he extended the deadline for the SWX competition to midnight December 2nd (GMT). So… no “not enought time” excuses anymore!

SWX explorer with code generation

I took the time today to add a simple code generator to the SWX service explorer. Right now, it spits out inline AS2 code for your service methods. I’ll add AS2 class generation and ARP code generation in the near future…

Download the source code
or
Try it online

Enjoy!

SWX contest

Hooray hooray hooray, we’re having a pa… contest!

To celebrate the release of SWX PHP version 1.0, Aral Balkan is organising a contest. There are 3 categories:

  • Web
  • Mobile
  • API

The prices are just awesome. Each winner will receive:

  • Adobe Web Suite Premium
  • Lynda.com 1 Year Premium Subscription
  • Nabaztag/tag bunny
  • iPod Touch
  • A copy of ActionScript Viewer (ASV)

More info at http://swxformat.org/contest

flash remoting with SWX and CakePHP

So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, …? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don’t be, and see the power of cakephp and SWX combined. CakePHP being a rapid development framework for PHP and SWX, the native data format for the flash platform! Continue reading ‘flash remoting with SWX and CakePHP’

CakeSWXPHP updated to SWX version 1.01

Aral Balkan released SWX version 1.0 a few weeks ago. I finally found the time to incorporate the changes into CakeSWXPHP! The changes include the swxAssembler class (instead of the old swfCompiler) and the rebranded service explorer.

Go to the cakeswxphp page for the latest downloads!

CakeSWXPHP updated to SWX beta 1.3

I took some time updating my cakeswxphp package to the SWX beta 1.3. One of the new features is the new service explorer from SWX.

You can test your cake gateway, pointing your browser to the /explorer/ directory, gateway location being: cake_amf_gateway.php

Go to the cakeswxphp page for the latest downloads!

Enjoy!