<?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>Flexperiments &#187; php</title>
	<atom:link href="http://labs.flexperiments.nl/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.flexperiments.nl</link>
	<description></description>
	<lastBuildDate>Sun, 23 May 2010 10:27:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Flexperminents online!</title>
		<link>http://labs.flexperiments.nl/flexperminents-online/</link>
		<comments>http://labs.flexperiments.nl/flexperminents-online/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 08:56:34 +0000</pubDate>
		<dc:creator>Ids Klijnsma</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flexperiments]]></category>

		<guid isPermaLink="false">http://blog.idsklijnsma.nl/?p=51</guid>
		<description><![CDATA[Today i&#8217;ve launched my new website, labs.flexperiments.nl. All new posts will be posted there, and my components will find a perminent place there. So update your links and rss feeds!]]></description>
			<content:encoded><![CDATA[<p>Today i&#8217;ve launched my new website, <a title="Flexperiments!" href="http://labs.flexperiments.nl" target="_blank">labs.flexperiments.nl</a>. All new posts will be posted there, and my components will find a perminent place there.</p>
<p>So update your links and rss feeds!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.flexperiments.nl/flexperminents-online/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebOrb closes the gap!</title>
		<link>http://labs.flexperiments.nl/weborb-closes-the-gap/</link>
		<comments>http://labs.flexperiments.nl/weborb-closes-the-gap/#comments</comments>
		<pubDate>Wed, 07 May 2008 21:25:26 +0000</pubDate>
		<dc:creator>Ids Klijnsma</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[AMF-PHP]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[remoteobject]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[WebOrb]]></category>

		<guid isPermaLink="false">http://blog.idsklijnsma.nl/?p=48</guid>
		<description><![CDATA[As of 30/04/2008, the Midnightcoders have released a new version of WebOrb for PHP (version 3.0.0). (Thanks David C. Moody for letting me know). And boy, they&#8217;ve certainly improved the performance! In my previous post WebOrb was a factor 4 slower than it&#8217;s opponent, AMFPHP. With this new version, the difference is much smaller. I [...]]]></description>
			<content:encoded><![CDATA[<p>As of 30/04/2008, the Midnightcoders have released a new version of WebOrb for PHP (version 3.0.0). (Thanks David C. Moody for letting me know). And boy, they&#8217;ve certainly improved the performance!</p>
<p>In my <a title="AMFPHP vs WebOrb" href="http://blog.idsklijnsma.nl/amfphp-vs-weborbphp/" target="_self">previous post</a> WebOrb was a factor 4 slower than it&#8217;s opponent, AMFPHP. With this new version, the difference is much smaller. I ran the &#8216;invoke large dataset&#8217; test and the difference was only 40ms (It used to take 6 seconds, it now takes 270ms). So AMFPHP still holds the speed record, but WebOrb is closing in!<span id="more-168"></span></p>
<p>Unfortunately, I could not found any release notes for this new version, so I cannot post which improvements they&#8217;ve made besides the performance.</p>
<p>I&#8217;ve updated the test application, so it now connects to weborb 3. You can run it <a title="WebOrb vs AMFPHP" href="http://www.idsklijnsma.nl/weborb3amftest/" target="_blank">here</a>.</p>
<p>All I can say is thumbs up for the Midnight Coders, and keep up the good work.</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.flexperiments.nl/weborb-closes-the-gap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AMFPHP vs. WeborbPHP</title>
		<link>http://labs.flexperiments.nl/amfphp-vs-weborbphp/</link>
		<comments>http://labs.flexperiments.nl/amfphp-vs-weborbphp/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 14:15:38 +0000</pubDate>
		<dc:creator>Ids Klijnsma</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[AMF-PHP]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[remoteobject]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[WebOrb]]></category>

		<guid isPermaLink="false">http://blog.idsklijnsma.nl/amfphp-vs-weborbphp/</guid>
		<description><![CDATA[The other day, we were discussing remoting frameworks and the options you have on a php server. At my work, we use AMFPHP, and never really looked for other solutions. For .NET applications we use WebOrb, so I was wondering how the php version of WebOrb would perform. The results are quite shocking. This information [...]]]></description>
			<content:encoded><![CDATA[<p>The other day, we were discussing remoting frameworks and the options you have on a php server. At my work, we use AMFPHP, and never really looked for other solutions. For .NET applications we use WebOrb, so I was wondering how the php version of WebOrb would perform. The results are quite shocking.<br />
<span id="more-162"></span></p>
<p><strong><span style="color: #ff0000;">This information is outdated, please see <a href="http://blog.idsklijnsma.nl/weborb-closes-the-gap/">WebOrb closes the gap!</a> for updated test results.</span><br />
</strong></p>
<p>First some information:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="184" valign="top"></td>
<td width="197" valign="top">AMF</td>
<td width="205" valign="top">WebOrb</td>
</tr>
<tr>
<td width="184" valign="top">download</td>
<td width="197" valign="top"><a href="http://sourceforge.net/project/showfiles.php?group_id=72483">here</a></td>
<td width="205" valign="top"><a href="http://www.themidnightcoders.net/downloadcenter/">here</a> (registration needed)</td>
</tr>
<tr>
<td width="184" valign="top">license</td>
<td width="197" valign="top">free (?)</td>
<td width="205" valign="top">Mozilla   Public License</td>
</tr>
<tr>
<td width="184" valign="top">version</td>
<td width="197" valign="top">1.9 beta   2</td>
<td width="205" valign="top">2.0.2</td>
</tr>
<tr>
<td width="184" valign="top">size</td>
<td width="197" valign="top">700kb</td>
<td width="205" valign="top">3700kb</td>
</tr>
<tr>
<td width="184" valign="top">supported   php versions</td>
<td width="197" valign="top">php 4,   php 5</td>
<td width="205" valign="top">php 5   (not tested on php 4)</td>
</tr>
<tr>
<td width="184" valign="top">remoting   flavours</td>
<td width="197" valign="top">amf0,   amf3</td>
<td width="205" valign="top">amf0,   afm3</td>
</tr>
<tr>
<td width="184" valign="top">service   browser</td>
<td width="197" valign="top">yes</td>
<td width="205" valign="top">yes</td>
</tr>
<tr>
<td width="184" valign="top">code   generator</td>
<td width="197" valign="top">no</td>
<td width="205" valign="top">yes,   different frameworks</td>
</tr>
</tbody>
</table>
<p>AMFPHP runs out of the box, you don&#8217;t have to change settings in order to get it to run, just move your php classes to the services folder and you&#8217;re good to go. For WebOrb, you need to change the remoting-config.xml and add your gateway variables. Also, if you want to use it in a production environment, you need to clean up that file.</p>
<p>A good thing of WebOrb is the code generator, if you use one of the supported frameworks.</p>
<h2>Enough of this, show me the test!</h2>
<p>I created a small flex sample app and a small php class to test both products. It turns out that, depending on the request size, AMF-PHP is a whopping 4 times faster! When the request becomes larger, the difference is even bigger. (The when you set the for loop in php to 10000, WebOrb will time out, while AMF-PHP happily returns the result.</p>
<p>The source of the flex app is available under the right mouse button, the source of the php looks like this:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p162code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1622"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code" id="p162code2"><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> test <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$lorum</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> test<span style="color: #009900;">&#40;</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;">lorum</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut id nisl non mi consectetuer rutrum. Phasellus a libero. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent tempus commodo justo. Curabitur vestibulum, tortor eu eleifend feugiat, arcu libero auctor lorem, id varius massa nisl ac sem. Morbi aliquet, purus at ullamcorper porta, sapien purus rhoncus est, nec tincidunt nulla massa non lectus. Phasellus ut elit et augue pellentesque tincidunt. Sed eu purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla velit nibh, sagittis sed, iaculis vitae, pellentesque et, neque. Praesent vulputate imperdiet orci.&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> testMethod<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: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m/d/Y H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> testLargeMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">5000</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$res</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span> <span style="color: #339933;">-&gt;</span> <span style="color: #004000;">lorum</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$res</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Pretty straight forward, just place it under [amfdir]/services/ and [webOrbdir]/Services/<br />
You can run the test yourself and download the source code <a title="WebOrb vs. AMF-PHP test" href="http://www.idsklijnsma.nl/weborbamftest/" target="_blank">here</a>.</p>
<p>So, concluding, it turns out that when you want remoting on a PHP based server, AMF-PHP is the way to go. It&#8217;s lightweight, fast and free. The only downside could be that the team developing it has been quiet for a while. WebOrb has the better (more professional) console, but that&#8217;s it. It&#8217;s just dead slow! I hope that the .NET, java and ruby versions of WebOrb are faster, because this performance is not acceptable.</p>
<p>If there&#8217;s anyone with suggestions to speed up WebOrb, please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.flexperiments.nl/amfphp-vs-weborbphp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
