<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aboutme - blog &#187; cakephp</title>
	<atom:link href="http://blog.aboutme.be/category/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aboutme.be</link>
	<description></description>
	<lastBuildDate>Fri, 13 Jan 2012 08:58:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>BakeMe &#8211;  Customized cakephp bake templates &amp; application skeleton</title>
		<link>http://blog.aboutme.be/2009/01/02/bakeme-customized-cakephp-bake-templates-application-skeleton/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bakeme-customized-cakephp-bake-templates-application-skeleton</link>
		<comments>http://blog.aboutme.be/2009/01/02/bakeme-customized-cakephp-bake-templates-application-skeleton/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 20:39:10 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=113</guid>
		<description><![CDATA[I just uploaded a first version of my cakephp scripts. Bakeme is a cakephp application skeleton with customized bake scripts, which enables you to create advanced, data-driven websites. Some of the features are: - Pasword protected backend, based on users in the database - Customized form helpers to add fckeditor input fields, server side file [...]]]></description>
			<content:encoded><![CDATA[<p>I just uploaded a first version of my cakephp scripts.</p>
<p>Bakeme is a cakephp application skeleton with customized bake scripts, which enables you to create advanced, data-driven websites.</p>
<p>Some of the features are:</p>
<p>- Pasword protected backend, based on users in the database<br />
- Customized form helpers to add fckeditor input fields, server side file browser fields, datepickers for date(time) fields, autocompletion functionality instead of comboboxes (if you set autocomplete to true using the extendedForm helper).<br />
- SoftDeletable behavior, so database records aren’t deleted instantly, but flagged as deleted<br />
- More advanced code generation, to generate nicer looking backends, based on your models<br />
- Option to bake all controllers instantly (using cake bake controller all (admin))<br />
- Option to bake all views instantly (using cake bake view all)<br />
- View code generation, to ajax sort records of models which have a field “order”.<br />
- Integration of cakeswxphp, which enables remoting on your website through swx, amf or json<br />
- &#8230;</p>
<p><a href="http://blog.aboutme.be/bakeme/">More info at the bakeme page&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2009/01/02/bakeme-customized-cakephp-bake-templates-application-skeleton/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CakeSWXPHP &#8211; updated to SWX 2.0 beta 1</title>
		<link>http://blog.aboutme.be/2008/12/23/cakeswxphp-updated-to-swx-20-beta-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-updated-to-swx-20-beta-1</link>
		<comments>http://blog.aboutme.be/2008/12/23/cakeswxphp-updated-to-swx-20-beta-1/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 23:24:07 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=90</guid>
		<description><![CDATA[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.]]></description>
			<content:encoded><![CDATA[<p>The first beta of the <a href="http://swxformat.org/192">new version of SWX was released yesterday</a>. This new version brings AS3 and Flash Player 10 support. I decided to update CakeSWXPHP, to support this new version of SWX. You can <a href="http://blog.aboutme.be/cakeswxphp/">download a new version, from my CakeSWXPHP page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2008/12/23/cakeswxphp-updated-to-swx-20-beta-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP SwiftMailer 3 Component</title>
		<link>http://blog.aboutme.be/2008/05/07/cakephp-swiftmailer-3-component/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakephp-swiftmailer-3-component</link>
		<comments>http://blog.aboutme.be/2008/05/07/cakephp-swiftmailer-3-component/#comments</comments>
		<pubDate>Wed, 07 May 2008 15:43:44 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2008/05/07/cakephp-swiftmailer-3-component/</guid>
		<description><![CDATA[I had some issues today using the cakephp swiftmailer component. It still relied on the older version (pre version 3) of swiftmailer. There are quite some changes between SwiftMailer 2 and 3, and I decided to adjust the SwiftMailer component so it works with SwiftMailer 3. Please note that this is the PHP5 version. To [...]]]></description>
			<content:encoded><![CDATA[<p>I had some issues today using the cakephp swiftmailer component. It still relied on the older version (pre version 3) of swiftmailer. There are quite some changes between SwiftMailer 2 and 3, and I decided to adjust the SwiftMailer component so it works with SwiftMailer 3.</p>
<p>Please note that this is the PHP5 version. To get it working in PHP4, you need to change the constants in the connect_sendmail and connect_smtp&#8230;</p>
<p>Download <a href='http://blog.aboutme.be/wp-content/uploads/2008/05/swift_mailer.rar' title='CakePHP SwiftMailer 3 Component'>CakePHP SwiftMailer 3 Component</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2008/05/07/cakephp-swiftmailer-3-component/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>benchmarking cakeswx/amfphp</title>
		<link>http://blog.aboutme.be/2008/01/20/benchmarking-cakeswxamfphp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=benchmarking-cakeswxamfphp</link>
		<comments>http://blog.aboutme.be/2008/01/20/benchmarking-cakeswxamfphp/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 18:48:10 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2008/01/20/benchmarking-cakeswxamfphp/</guid>
		<description><![CDATA[Cakeswxphp enables you to use the cakphp rapid application framework as your remoting backend. No longer writing complex sqls, escaping query strings,&#8230; 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 [...]]]></description>
			<content:encoded><![CDATA[<p>Cakeswxphp enables you to use the cakphp rapid application framework as your remoting backend. No longer writing complex sqls, escaping query strings,&#8230; 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:</p>
<p>SWX: 346ms<br />
CakeSWXPHP 1.1: 350ms<br />
CakeSWXPHP 1.2: 369ms<br />
AMFPHP: 57ms<br />
CakeAMFPHP 1.1: 111ms<br />
CakeAMFPHP 1.2: 126ms</p>
<p>As we already know, AMFPHP is fast as hell. The CakePHP version is 2x slower because of the extra classes &#038; functions cakephp executes. The difference between SWX and CakeSWX isn&#8217;t that big.</p>
<p>After that, I turned out eaccelerator (PHP caching / accelerator system) and ran the benchmark again:</p>
<p>SWX: 347ms<br />
CakeSWXPHP 1.1: 364ms<br />
CakeSWXPHP 1.2: 362ms<br />
AMFPHP: 50ms<br />
CakeAMFPHP 1.1: 64ms<br />
CakeAMFPHP 1.2: 67ms</p>
<p>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!</p>
<p>I&#8217;ve included the benchmark scripts:</p>
<p><a href='http://blog.aboutme.be/wp-content/uploads/2008/01/cakeswxphp.fla' title='cakeswxphp SWX benchmark'>cakeswxphp SWX benchmark</a><br />
<a href='http://blog.aboutme.be/wp-content/uploads/2008/01/cakeswxphpbenchmark.as' title='cakeswxphp AMF benchmark (AS3)'>cakeswxphp AMF benchmark (AS3)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2008/01/20/benchmarking-cakeswxamfphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>cakeswxphp: simpler and on cake 1.2</title>
		<link>http://blog.aboutme.be/2007/12/18/cakeswxphp-simpler-and-on-cake-12/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-simpler-and-on-cake-12</link>
		<comments>http://blog.aboutme.be/2007/12/18/cakeswxphp-simpler-and-on-cake-12/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 17:53:00 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/12/18/cakeswxphp-simpler-and-on-cake-12/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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!</p>
<p>Again, you can <a href="http://blog.aboutme.be/cakeswxphp/">download it at the cakesxwphp page</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/12/18/cakeswxphp-simpler-and-on-cake-12/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>flash remoting with SWX and CakePHP</title>
		<link>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flash-remoting-with-swx-and-cakephp</link>
		<comments>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 01:56:25 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/</guid>
		<description><![CDATA[So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, &#8230;? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don&#8217;t be, and see the power of cakephp and SWX combined. CakePHP being a rapid development framework for [...]]]></description>
			<content:encoded><![CDATA[<p>So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, &#8230;? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don&#8217;t be, and see the power of <a href="http://www.cakephp.org" target="_blank">cakephp</a> and <a href="http://swxformat.org" target="_blank">SWX</a> combined. CakePHP being a rapid development framework for PHP and SWX, the native data format for the flash platform!<span id="more-30"></span></p>
<p>If you don&#8217;t have a running webserver with PHP + mysql + phpmyadmin yet, you&#8217;ll have to 	install these packages first.</p>
<ul>
<li>Windows users can <a target="_blank" href="http://www.wampserver.com/en/">install WAMP</a>, which will install these packages at once on your development machine.</li>
<li>Mac users can <a target="_blank" href="http://sourceforge.net/projects/mamp">install MAMP</a>, which does the same (there is a MAMP bundle on swxformat, but we won&#8217;t use this one, as we&#8217;ll need to copy SWX to another directory anyway to work with cakephp).</li>
</ul>
<p>When you have your webserver set up, we&#8217;ll <a target="_blank" href="http://cakephp.org/downloads">download the latest version of cakephp</a>. Unzip it to you webroot (WAMP default: C:\wamp\www &#8211; MAMP default: /Applications/MAMP/htdocs) and rename the unzipped directory to &#8220;flashblog&#8221;. You now have the following file structure:</p>
<ul>
<li>WWW</li>
<ul>
<li>flashblog</li>
<ul>
<li>app</li>
<li>cake</li>
<li>docs</li>
<li>index.php</li>
<li>vendors</li>
</ul>
</ul>
</ul>
<p>If you are deploying on a webserver, make sure the app/tmp/ directory and it&#8217;s subdirectories are writeable (chmod 777).</p>
<p>After that, we&#8217;ll add <a target="_blank" href="http://blog.aboutme.be/cakeswxphp">cakeswxphp</a> to our cake install. <a target="_blank" href="http://blog.aboutme.be/cakeswxphp">Download cakeswxphp</a> and unzip it somewhere on your computer. Copy/Paste the content of the app and vendors dir of cakeswxphp to the same directories of your flashblog directory. If you did everything correctly, you can point your browser to: <a target="_blank" href="http://localhost/flashblog/explorer/">http://localhost/flashblog/explorer/</a>. This opens the SWX Service Explorer. Set the amf path to http://localhost/flashblog/amf.php (default).</p>
<p>This should give you an overview of the remoting services, which we can call via flash. Right now, the only service is amfphp/discovery_service&#8230;</p>
<p>Now that we have cakephp &#038; cakeswxphp installed, we will setup our database for our blog. Point your browser to the phpMyAdmin on your development machine (WAMP default: http://localhost/phpmyadmin &#8211; MAMP default: http://localhost/phpMyAdmin/).</p>
<p>Using phpmyadmin, create a new database called &#8220;flashblog&#8221;.</p>
<p><img id="image31" alt="afbeelding-1.png" src="http://blog.aboutme.be/wp-content/uploads/2007/09/afbeelding-1.png" /></p>
<p>Execute the following SQL to create the tables for our blog:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`comments`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`created`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`modified`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`post_id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`nickname`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`title`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`content`</span> text <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`id`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1 <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> ; <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`posts`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`created`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`modified`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`nickname`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`title`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`content`</span> text <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`id`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1 <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> ;</pre></div></div>

<p>That&#8217;s it, our database is set up! Now it is time to write our cakephp classes to work with our database&#8230;</p>
<p>First of all, we need to tell cakephp how to access our database. Rename flashblog/app/config/database.php.default to database.php and open it in your favorite text/php editor. You can adjust the database configuration in the $default var in this file. In my case, it looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mysql'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'connect'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mysql_connect'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'database'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'flashblog'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'prefix'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If you point your browser to http://localhost/flashblog/ you should get the message that cake is able to connect to the database. If not, check your database settings again in flashblog/app/config/database.php.</p>
<p>So, we can connect to our database. Now we&#8217;ll define our post and comment models in php so that cakephp knows how to read and write posts and comments to the database. We could use the cake bake script to do this, but right now we&#8217;ll just write the code ourselves.</p>
<p>First of all, we&#8217;ll adjust the default model. Create app_model.php in flashblog/app/ with the following contents:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> AppModel <span style="color: #000000; font-weight: bold;">extends</span> Model <span style="color: #009900;">&#123;</span>
	 <span style="color: #000000; font-weight: bold;">function</span> beforeSave<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
					 <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
					 <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_object_vars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">primaryKey</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'$this-&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">primaryKey</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' =  $this-&gt;data[$this-&gt;name][$this-&gt;primaryKey];'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now, we can define our post and comments models. Create a file called post.php in flashblog/app/models/:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Post <span style="color: #000000; font-weight: bold;">extends</span> AppModel <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Post'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$hasMany</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'Comment'</span> <span style="color: #339933;">=&gt;</span>
				<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'className'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Comment'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'foreignKey'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post_id'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'dependent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then, create comment.php in that same directory (flashblog/app/models/) :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Comment <span style="color: #000000; font-weight: bold;">extends</span> AppModel <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Comment'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$belongsTo</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&gt;</span>
				<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'className'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Post'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'foreignKey'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post_id'</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>CakePHP now knows how to read and write posts and related comments to the database! Next, we will create our remoting methods (cake controllers) which we will call from flash.</p>
<p>Create posts_controller.php in flashblog/app/controllers:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> PostsController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Posts'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> getPosts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> getPost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> savePost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> deletePost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">del</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then, create the controller for our comments (flashblog/app/controller/comments_controller.php):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> CommentsController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Comments'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> saveComment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> deleteComment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">del</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And here ends the PHP side of our flash blog. Let&#8217;s have some fun with Flash &#038; ActionScript, shall we?</p>
<p>Launch up flash and create a new fla (Actionscript 2). Save it somewhere as &#8220;flashblog.fla&#8221;. Now we&#8217;ll write the methods to read/write/delete blogposts and comments. SWX remoting doesn&#8217;t really need extra classes (you loadMovie your data), but using the classes makes you code a lot smaller and easier to write. So <a href="http://swxformat.org/download/" target="_blank">download the SWX ActionScript library</a> and extract the &#8220;org&#8221; folder to the same directory as your flashblog.fla file.</p>
<p>When you&#8217;ve got the org folder in the same folder as your flashblog.fla file, go back to your flashblog.fla file, select frame one and open the actions panel. We&#8217;ll start with importing the SWX class and setting up our gateway:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> org.<span style="color: #006600;">swxformat</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #000000; font-weight: bold;">var</span> swx:SWX = <span style="color: #000000; font-weight: bold;">new</span> SWX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
swx.<span style="color: #006600;">gateway</span> = <span style="color: #ff0000;">&quot;http://localhost/flashblog/swx.php&quot;</span>;
swx.<span style="color: #006600;">encoding</span> = <span style="color: #ff0000;">&quot;POST&quot;</span>;</pre></div></div>

<p>Now we can write our actionscript functions to communicate with our swx php classes. The following function sends a new post to our php class, which inserts it in the database:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
* function to create a new post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createPost<span style="color: #66cc66;">&#40;</span>nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>nickname, title, content<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the post was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> savePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>That&#8217;s all it takes. No query writing. No XML parsing. No complex php files&#8230;<br />
Now, let&#8217;s complete our actionscript code with the other functions to communicate with php:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//we import the SWX classes</span>
<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">swxformat</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #808080; font-style: italic;">//create a new SWX instance</span>
<span style="color: #000000; font-weight: bold;">var</span> swx:SWX = <span style="color: #000000; font-weight: bold;">new</span> SWX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">//location of the SWX gateway</span>
swx.<span style="color: #006600;">gateway</span> = <span style="color: #ff0000;">&quot;http://localhost/flashblog/swx.php&quot;</span>;
<span style="color: #808080; font-style: italic;">//we'll transfer data using POST.</span>
swx.<span style="color: #006600;">encoding</span> = <span style="color: #ff0000;">&quot;POST&quot;</span>;
<span style="color: #808080; font-style: italic;">/**
*get all posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPosts<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;getPosts&quot;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, getPostsResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostsResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> posts_length:<span style="color: #0066CC;">Number</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> posts_length; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> post:<span style="color: #0066CC;">Object</span> = resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>post.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>post.<span style="color: #006600;">Post</span>.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*get a post with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;getPost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, getPostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to create a new post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createPost<span style="color: #66cc66;">&#40;</span>nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Post: <span style="color: #66cc66;">&#123;</span>nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to edit a post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> editPost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Post: <span style="color: #66cc66;">&#123;</span>id: id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the post was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> savePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> comments_length:<span style="color: #0066CC;">Number</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> comments_length; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> comment:<span style="color: #0066CC;">Object</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>comment.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>comment.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*delete a post with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deletePost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;deletePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, deletePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deletePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to create a new comment
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createComment<span style="color: #66cc66;">&#40;</span>post_id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;saveComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Comment: <span style="color: #66cc66;">&#123;</span>post_id: post_id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, saveCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to edit a comment
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> editComment<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span>, post_id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;saveComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Comment: <span style="color: #66cc66;">&#123;</span>id: id, post_id: post_id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, saveCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the comment was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> saveCommentResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*delete a comment with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deleteComment<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;deleteComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, deleteCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deleteCommentResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can test the functions by calling them manually through AS code. The next thing todo is create a gui to show posts, edit posts, etc. But that&#8217;s beyond the scope of this tutorial&#8230;</p>
<p>Happy flashing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>CakeSWXPHP updated to SWX version 1.01</title>
		<link>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-updated-to-swx-version-101</link>
		<comments>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 14:40:38 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/</guid>
		<description><![CDATA[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!]]></description>
			<content:encoded><![CDATA[<p><a title="Blog of Aral Balkan" href="http://www.aralbalkan.com/">Aral Balkan</a> released <a title="Official SWX homepage" href="http://www.swxformat.org">SWX version 1.0</a> 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.</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CakeSWXPHP updated to SWX beta 1.3</title>
		<link>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-updated-to-swx-beta-13</link>
		<comments>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 09:41:42 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/</guid>
		<description><![CDATA[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!]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>You can test your cake gateway, pointing your browser to the /explorer/ directory, gateway location being: cake_amf_gateway.php</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>call cakephp through swx / amf</title>
		<link>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=call-cakephp-through-swx-amf</link>
		<comments>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 20:41:41 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/</guid>
		<description><![CDATA[As some of you might know, I&#8217;m a great fan of the cakephp framework. It is a rapid application framework for php. Cakephp already had a subproject called cakeamfphp. Looking at the code from cakeamfphp, I was able to get SWX running and call the cake controllers as remoting services. Go to the cakeswxphp page [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might know, I&#8217;m a great fan of the cakephp framework. It is a rapid application framework for php. Cakephp already had a subproject called cakeamfphp. Looking at the code from cakeamfphp, I was able to get SWX running and call the cake controllers as remoting services.</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads&#8230;</p>
<p>Just copy/past in your cake directory! Gateway locations are:</p>
<p>swx.php (SWX)<br />
amf.php (AMFPHP)<br />
json.php (JSON)</p>
<p>Currently it uses an adjusted version of SWX, based on SWX beta 1.0. I will try to update it to future versions of SWX when I get the time&#8230;</p>
<p>More info about SWX and cakephp at:</p>
<p><a target="_blank" title="SWX project" href="http://www.swxformat.org/">http://www.swxformat.org/</a><br />
<a target="_blank" title="aral balkan blog" href="http://www.aralbalkan.com/">http://www.aralbalkan.com/</a> (Aral Balkan, SWX author)<br />
<a target="_blank" title="cakephp project" href="http://www.cakephp.org/">http://www.cakephp.org/</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

