Thursday, January 08, 2009

Mix and match baby!

This fashionista project I'm working on for a NY client has inspired me to creatively tailor the folds of the CakePHP framework at the back, ActionScript 2 with Pixlib at the front while sewing everything together with the AMFPHP part of CakeSWX.
Mix and mach baby, because only quality matters and not all of us have to be fashion whores ;)

Just one thing you really need to remember. In development mode you really really really need to set the debug level to zero in the methods called by AMFPHP because otherwise the debug output will pollute the amf results and cause it to fail so randomly that you might lose a couple of hours in Ethereal until you figure it out. Although the Cake Book section for Configure::write clearly outlines this usage :p

So in your cake controllers you put something like:

...
var $components = array( 'RequestHandler' );
...
function beforeFilter () {
// disable debug
if( $this->RequestHandler->requestedWith() == 'amf' ) {
Configure::write('debug', 0);
}
}

so you disable the debug output if the request came from flash.

Have a great 2009 and remember, you are what you wear!

0 Comments:

Post a Comment

<< Home