<?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>publicreative lab &#187; php</title>
	<atom:link href="http://lab.publicreative.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.publicreative.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 15:59:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AMF command line utility</title>
		<link>http://lab.publicreative.com/2009/03/amf-command-line-utility/</link>
		<comments>http://lab.publicreative.com/2009/03/amf-command-line-utility/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 14:23:07 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://lab.publicreative.com/?p=91</guid>
		<description><![CDATA[We do a lot of projects with AMF at Public, and historically we&#8217;ve used amfphp on our back end. On a current project however we are using Zend framework. The Zend_AMF module is the successor of the original amfphp project, but it is missing one really useful thing &#8211; it doesn&#8217;t have a service browser [...]]]></description>
			<content:encoded><![CDATA[<p>We do a lot of projects with <a href="http://en.wikipedia.org/wiki/Action_Message_Format" target="_blank">AMF</a> at Public, and historically we&#8217;ve used <a href="http://www.amfphp.org/">amfphp</a> on our back end. On a current project however we are using <a href="http://framework.zend.com/">Zend framework</a>. The <a href="http://framework.zend.com/manual/en/zend.amf.html">Zend_AMF</a> module is the successor of the original amfphp project, but it is missing one really useful thing &#8211; it doesn&#8217;t have a service browser like amfphp does. I appreciate that there is fairly good reason for this, but it is a super handy tool we&#8217;ve come quite used to having available.</p>
<p><strong>So what&#8217;s the problem?</strong></p>
<p>If your PHP developers  have to start work before your Flash developers, you may find yourself with a back end, but no front end, so how do you test everything works? Moreover, how do you develop the back end at all if you can&#8217;t send and receive requests from your AMF gateway?</p>
<p>I wrote a simple command line tool for testing AMF calls, so I thought I&#8217;d share it with you here:<br />
<a href="http://lab.publicreative.com/wp-content/uploads/2009/03/amf.tgz"><strong>Download the amf command line program</strong></a>, requires PHP 5.2 with the json extension enabled.</p>
<p>It&#8217;s a fairly crude tool, and cannot support class mapping, but it&#8217;s currently helping us out very nicely. If you like it, or would like to see any improvements, please post a comment.</p>
<p><span id="more-91"></span><strong>Usage</strong>:</p>
<p>Download and make sure you can execute the program</p>
<pre>&gt; wget http://lab.publicreative.com/wp-content/uploads/2009/03/amf.tgz
&gt; tar -xvzf amf.tgz
&gt; chmod u+x amf</pre>
<p>For each service you want to test, create a file containing three lines.<br />
1. The URL of your AMF service gateway<br />
2. The method you want to call, &lt;service&gt;.&lt;method&gt;<br />
3. The arguments to post to the service as a JSON array. This may go onto multiple lines</p>
<p>Here&#8217;s the bundled example in <em>example_test.txt</em></p>
<pre>http://mydomain.com/my/amf/gateway
MyServiceClass.MyMethod
[
  "Arguments in JSON format",
  "always as an array",
  { "objects": "are also legal" }
]</pre>
<p>To execute this test, pipe the file into the amf program as stdin, e.g.<code><br />
&gt; cat example_test.txt | ./amf</code></p>
<p>You should see the deserialized arguments you are about to post, then a hex dump of the request packet, and then hopefully the response, followed by the deserialized response data.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.publicreative.com/2009/03/amf-command-line-utility/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP UK 2009 conference</title>
		<link>http://lab.publicreative.com/2009/03/php-uk-2009-conference/</link>
		<comments>http://lab.publicreative.com/2009/03/php-uk-2009-conference/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 15:32:28 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpuk2009]]></category>

		<guid isPermaLink="false">http://lab.publicreative.com/?p=81</guid>
		<description><![CDATA[Public were at the PHP UK 2009 conference on Friday.
There&#8217;s been a lot of buzz in recent years over other Linux-based web development platforms like Ruby and Python, but we&#8217;ve stuck with our expertise and believe that PHP&#8217;s future is as bright as ever. I for one was looking forward to this conference as confirmation [...]]]></description>
			<content:encoded><![CDATA[<h3>Public were at the PHP UK 2009 conference on Friday.</h3>
<p>There&#8217;s been a lot of buzz in recent years over other Linux-based web development platforms like Ruby and Python, but we&#8217;ve stuck with our expertise and believe that PHP&#8217;s future is as bright as ever. I for one was looking forward to this conference as confirmation of this, and particularly eager to hear all about PHP 6. Unfortunately this is not quite what we got, but it was a good day on the whole, and always great to meet developers from other backgrounds and sectors outside the creative industries.</p>
<p>Here&#8217;s a quick breakdown of some of the talks.</p>
<h3><span id="more-81"></span>Keynote, (<a href="http://www.phpconference.co.uk/speakers#AralBalkan" target="_blank">Aral Balkan</a>)</h3>
<p>An amusing and inspirational warm up, but very little to do with PHP. Aral talked mostly about Flash, and the iPhone, but that&#8217;s ok, because we love that stuff too. This session did the trick in motivating everyone for the day.</p>
<h3>Sharding Architectures (<a href="http://www.phpconference.co.uk/speakers#DavidSoriaParra" target="_blank">David Soria Parra</a>)</h3>
<p>A very technical talk on a database scaling technique called Sharding. Pretty dry stuff, but useful information. Talks like this really highlight how small scale projects really are in the creative industry, but it&#8217;s important to be prepared. You never know when a project might go intergalactic and you have to scale up quickly. That&#8217;s why we&#8217;re starting to look at cloud hosting solutions, and techniques like are set to become increasingly important.</p>
<h3>Clouds on the horizon, get ready for Drizzle (<a href="http://www.phpconference.co.uk/speakers#DavidAxmark" target="_blank">David Axmark</a>)</h3>
<p>It was great to hear such an authority on MySQL speaking. Drizzle is an off-shoot of MySQL which is brutally stripped down to a more simple set of common features. Interesting stuff, although I think we&#8217;ll be waiting a while before this becomes an important part of PHP development. As above however, a smaller database server could become very relevant as we move into the cloud.</p>
<h3>Living with Frameworks (<a href="http://www.phpconference.co.uk/speakers#StuartHerbert" target="_blank">Stuart Herbert</a>)</h3>
<p>This topic is of particular interest to me, and I spoke to Stuart in depth afterwards. He highlighted that adopting a development framework still isn&#8217;t universal amoungst the PHP community. Stuart consulted the audience a lot during his talk and it was clear that many are still resistant to the idea.</p>
<h3>Flex and AIR for PHP programmers (<a href="http://www.phpconference.co.uk/speakers#MihaiCorlan" target="_blank">Mihai Corlan</a>)</h3>
<p>This topic is right up our street at Public, and we were really looking forward to some new insights. Unfortunately it was really a beginners talk and didn&#8217;t cover anything we haven&#8217;t been doing for years. To be fair though, the programme did say it was an introduction.</p>
<h3>State Machines to State of the Art (<a href="http://www.phpconference.co.uk/speakers#RowanMerewood" target="_blank">Rowan Merewood</a>)</h3>
<p>This topic is very relevant to a current project at Public that involves developing a RESTful API over XML web services. A well delivered talk and a few interesting insights into the relationship between HTTP and REST.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.publicreative.com/2009/03/php-uk-2009-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

