<?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>Just another pointless blog</title>
	<atom:link href="http://blog.magudia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.magudia.com</link>
	<description>More crazy nonsense from the mind of Milan</description>
	<lastBuildDate>Sat, 03 Oct 2009 11:48:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing PHP 5.3, Apache2 and MySQL5 using MacPorts</title>
		<link>http://blog.magudia.com/2009/08/22/installing-php53-apache2-mysql5-using-macports/</link>
		<comments>http://blog.magudia.com/2009/08/22/installing-php53-apache2-mysql5-using-macports/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 14:56:38 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Mac OS X 10.6]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/?p=105</guid>
		<description><![CDATA[<p>I&#8217;ve read a few posts on how to installed PHP on my mac using macports, but quite a few seem out of date or incomplete. I hope this is a guide on how I think it should be done from start to finish using easier to understand small steps.</p>
<p style="padding-left: 30px;">Updates:</p>
<p>28/08/09: Now works with Snow [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read a few posts on how to installed PHP on my mac using macports, but quite a few seem out of date or incomplete. I hope this is a guide on how I think it should be done from start to finish using easier to understand small steps.</p>
<p style="padding-left: 30px;">Updates:</p>
<blockquote><p>28/08/09: Now works with Snow Leopard and this post has been updated reflect the latest variant changes to the PHP 5.3 install</p>
<p>03/09/09: Typo fixes and corrections from feedback</p></blockquote>
<h3>What? But my mac comes with PHP &amp; Apache!</h3>
<p>Well the first question should really be why use MacPorts instead of using the Apache/PHP that comes with OS-X. Basically the answer to that is that by default it&#8217;s not really setup for serious developer use, just the average end user who wants to play around with a script of hack together a small website. You could also use <a title="Macintosh, Apache, Mysql and PHP" href="http://www.mamp.info/en/mamp/index.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.mamp.info/en/mamp/index.html?referer=');">MAMP</a>, but personally I don&#8217;t think it give me the level of control that I need as I try and develop with an environment as close to my production system that I can (i.e. a base unix environment). MAMP also <a href="http://www.mamp.info/en/documentation/releases.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.mamp.info/en/documentation/releases.html?referer=');">hasn&#8217;t been updated</a> for a while! Once you&#8217;re fully setup with MacPorts updating is a breeze and as the whole system has been compiled onto your machine in theory it should be a lot faster than a prebuilt universal binary.</p>
<h3>Pre-Configure: Turn off the default web server</h3>
<p>So the first thing you should do is to turn off Apache&#8230;</p>
<p>This is pretty simple, go to System Preferences, type Apache in it&#8217;s spotlight. It will highlight Sharing, but you just need to press return. Just make sure Web Sharing is disabled.</p>
<h3>Setting up MacPorts</h3>
<h4>Install Xcode</h4>
<p>Next you must make sure you&#8217;ve installed Apple&#8217;s <a style="color: #0155cd; text-decoration: underline;" title="Xcode" href="http://developer.apple.com/tools/xcode/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/tools/xcode/?referer=');">Xcode</a> Developer Tools (version 3.1 or later for Leopard, or 2.4.1 or later for Tiger), found at the <a style="color: #0155cd; text-decoration: underline;" title="Apple Developer site" href="http://connect.apple.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/connect.apple.com/?referer=');">Apple Developer Connection</a> site or on your Mac OS X installation CDs/DVD. This basically installs a more complete unix developer base with compilers are other useful stuff needed for MacPorts.</p>
<h4>Install MacPorts</h4>
<p>After installing Xcode you can download and install <a title="Install MacPorts" href="http://www.macports.org/install.php" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.macports.org/install.php?referer=');">MacPorts</a>. The best way to install it is to use the DMG installer on the MacPorts site. On the other hand if you want to compile it from source then follow these steps:</p>
<p style="padding-left: 30px;"><span style="font-weight: normal; font-size: 12px;">Open up the Terminal</span></p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">svn co http://svn.macports.org/repository/macports/trunk/base/
cd base
./configure
make
sudo make install</pre>
</blockquote>
<p>I recommend whichever way you install macports you should run this command to make sure everything is up to date:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo /opt/local/bin/port -v selfupdate</span></pre>
</blockquote>
<p>If nothing as gone wrong so far then you should have MacPorts fully setup. Only one more thing to do before installing PHP/MySQL and Apache</p>
<h4>Update your system paths</h4>
<p>Just so I don&#8217;t have to keep on typing /opt/local/bin all the time i&#8217;m going add that directory to my PATH. This information can be stored in your .profile which runs every time you start a new terminal. If you don&#8217;t have a .profile file use these steps to create one:</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">cd ~
echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' &gt;&gt; .profile</pre>
</blockquote>
<p>and that&#8217;s that. If you open a new terminal window (yes do that now) then those directories will be searched for terminal commands before the ones in the default path.</p>
<h3>Setting up the LAMP stack</h3>
<h4>Enable SSL &#8211; if you want to!</h4>
<p>Before installing PHP, i&#8217;m going to make sure that the version of curl installed is compiled with SSL enabled. If you don&#8217;t need or care about SSL then you can safely skip this step.</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo port install curl +ssl</span></pre>
</blockquote>
<p>You should note that regardless if you run the command above first or one of the ones below then MacPorts will download a whole bunch or ports that are required to install that port or one of its dependencies. Also these commands may take sometime, so give it a while or go make a cup a tea.</p>
<h4>Install MySQL</h4>
<p>This one is fairly simple, well kind of&#8230;</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo port install mysql5-server</span></pre>
</blockquote>
<p>Note: a lot of blogs recommend installing just the mysql5 port, but if you want the option to have MySQL start automatically at startup you&#8217;ll want to install the server. The mysql5-server port installs the mysql5 port anyway, so you can&#8217;t lose!</p>
<p>If you want to run MySQL at startup then run this command after the port finishes installing</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist</span></pre>
</blockquote>
<p>Finally to make sure that the database if fully setup you must run this command (before starting up any mysql process!)</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo -u mysql mysql_install_db5</span></pre>
</blockquote>
<p>And make sure you pay attention to its instructions! Personally I didn&#8217;t do anything here as this is a development setup for me, so I prefer to keep my settings loose. Although if you want MySQL commands in your terminals path (like port) then run these commands and start a new terminal:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">cd ~</span>
<span style="font-weight: normal; font-size: 12px;">echo 'export PATH=/opt/local/lib/mysql5/bin:$PATH' &gt;&gt; .profile</span></pre>
</blockquote>
<p>Create  /opt/local/etc/mysql5/my.cnf, add the following to it and save</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">[mysqld_safe]</span> <span style="font-weight: normal; font-size: 12px;">socket = /tmp/mysql.sock</span></pre>
</blockquote>
<p>Also to remain compatible with other programs that may have been coded to look for the socket file in its original location then add this symbolic link:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo ln -s /tmp/mysql.sock /opt/local/var/run/mysql5/mysqld.sock</span></pre>
</blockquote>
<h4>Install PHP &amp; Apache</h4>
<p>Ok we&#8217;re finally installing PHP (with MySQL support) and Apache.</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo port install php5 +apache2 +pear php5-mysql +mysqlnd</span></pre>
</blockquote>
<p>Like MySQL if you want Apache to start automatically when you start your computer then run this command after the port installs (as shown while the ports are installing)</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist</span></pre>
</blockquote>
<h4>Configure PHP</h4>
<p>To customize php, copy /opt/local/etc/php5/php.ini-development (if this is a development server) or /opt/local/etc/php5/php.ini-production (if this is a production server) to /opt/local/etc/php5/php.ini and then make changes (see below).</p>
<p>i.e. for development:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">cd /opt/local/etc/php5/</span>
<span style="font-weight: normal; font-size: 12px;">sudo cp php.ini-development php.ini</span></pre>
</blockquote>
<p>i.e. for production:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">cd /opt/local/etc/php5/</span>
<span style="font-weight: normal; font-size: 12px;">sudo cp php.ini-production php.ini</span></pre>
</blockquote>
<p>If this is your first install, you need to activate PHP in your web server. To enable PHP in Apache, run:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">cd /opt/local/apache2/modules</span>
<span style="font-weight: normal; font-size: 12px;">/opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so</span></pre>
</blockquote>
<p>To customize php edit (using your favourite editor) /opt/local/etc/php5/php.ini to configure it properly, make sure you set the correct timezone (for myself it&#8217;s this):</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">date.timezone = Europe/London</span></pre>
</blockquote>
<h4>Configure Apache</h4>
<p>If this is your first install, you need to activate PHP in your web server.To enable PHP in Apache, run</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so</pre>
</blockquote>
<p>Open /opt/local/apache2/conf/httpd.conf in your favourite text editor (it&#8217;s vi for me, but feel free to use pico, emacs or whatever!).</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">
sudo vi /opt/local/apache2/conf/httpd.conf</span></pre>
</blockquote>
<p>If you want to change the default MacPorts Apache document root to match default Apple&#8217;s Apache (personally I didn&#8217;t, but I found this information on another blog &#8211; so it might be useful to some), change:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">DocumentRoot "/opt/local/apache2/htdocs"</span></pre>
</blockquote>
<p>to:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">DocumentRoot "/Library/WebServer/Documents"</span></pre>
</blockquote>
<p>If you changed the DocumentRoot, change the Directory directive from:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">&lt;Directory "/opt/local/apache2/htdocs"&gt;</span></pre>
</blockquote>
<p>to</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">&lt;Directory "/Library/WebServer/Documents"&gt;</span></pre>
</blockquote>
<p>For PHP to work correctly you must add index.php to the dir_module directive:</p>
<blockquote>
<pre><span style="font-weight: normal; font-size: 12px;">&lt;IfModule dir_module&gt;
    DirectoryIndex index.html index.php
&lt;/IfModule&gt;</span></pre>
</blockquote>
<p>Add a new mimetype so that Apache will direct files ending in .php to the PHP module for processing. Add the following within the &lt;IfModule mime_module&gt; block. Without this, all you&#8217;ll see is the text of your PHP scripts</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps</pre>
</blockquote>
<p>And finally, to enable user directories, uncomment:</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">Include conf/extra/httpd-userdir.conf</pre>
</blockquote>
<p>But if you are going to use virtual hosts (as described below) then uncomment this line in addition to (or instead of) the line above:</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">Include conf/extra/httpd-vhosts.conf</pre>
</blockquote>
<p>Save and close the httpd.conf file.</p>
<h3>Advanced Post-Configuration</h3>
<h4>Configure Apache Virtual Hosts</h4>
<p>Now unless you just want to access your new web server using http://localhost you might want to set up some virtual hosts for Apache. I personally only need one virtual host atm i.e. http://testing.example.com. Virtual hosts need to be configured in two places, the hosts file (/etc/hosts) and the Apache virtual hosts file (/opt/local/apache2/conf/extra/httpd-vhosts.conf).</p>
<p>Firstly add this line to /etc/hosts after the localhost has been defined i.e.</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">127.0.0.1    localhost
127.0.0.1    testing.example.com</pre>
</blockquote>
<p>Then you must edit the virtual hosts file /opt/local/apache2/conf/extra/httpd-vhosts.conf and add this configuration</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@testing.example.com
    DocumentRoot "/opt/local/apache2/vhosts/testing.example.com"
    ServerName testing.example.com
    ServerAlias www.testing.example.com
    ErrorLog "logs/testing.example.com-error_log"
    CustomLog "logs/testing.example.com-access_log" common
&lt;/VirtualHost&gt;</pre>
</blockquote>
<p>The document root can be anything you want as long as apache has permissions to read that directory i.e. in this case you can:</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">sudo mkdir -p /opt/local/apache2/vhosts/testing.example.com
cd /opt/local/apache2/vhosts/
sudo chmod -R 755 testing.example.com</pre>
</blockquote>
<p>You can do this process for as many virtual hosts as you want. Also I personally keep all my websites stored in my user directory &#8211; yes bad on a server, but this is my personal development machine. Finally don&#8217;t forget to comment out or remove the example vhosts from http-vhost.conf or you&#8217;ll get warnings while starting up Apache, they are harmless to leave in, but it&#8217;s probably for the best to remove any potential errors</p>
<h4>Installing extra PHP modules</h4>
<p>There are plenty of extra PHP modules available from MacPorts, you can get a list of them by using this command. Although you won&#8217;t need any of the MySQL ones as you&#8217;ve already compiled it into PHP.</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">port search php5-</pre>
</blockquote>
<p>Here is the list of PHP5 ports I installed</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">sudo port install php5-openssl php5-curl php5-gd php5-iconv php5-http php5-mcrypt php5-xdebug</pre>
</blockquote>
<h3>Updating MacPorts</h3>
<p>MacPorts is simple to update, every few weeks I just run the command below to check for any outdated ports (i&#8217;ll also update this post with any changes to this process I discover)</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">sudo port outdated</pre>
</blockquote>
<p>to update all installed ports to the latests and greatest</p>
<blockquote>
<pre style="font-weight: normal; font-size: 12px;">sudo port upgrade outdated</pre>
</blockquote>
<h3>That&#8217;s It</h3>
<p>Now if you restart your computer and add code into the document root of your website (in this case http://testing.example.com) then you should have a fully working web server with PHP and MySQL. Ok it wasn&#8217;t easy, but for me it&#8217;s the best solution over the longer term</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2009/08/22/installing-php53-apache2-mysql5-using-macports/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Slicehost move</title>
		<link>http://blog.magudia.com/2009/07/19/slicehost/</link>
		<comments>http://blog.magudia.com/2009/07/19/slicehost/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 21:21:20 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SliceHost]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2009/07/19/flickr/</guid>
		<description><![CDATA[<p>Some content is missing from my previous blog posts at the moment as i&#8217;ve moved my hosting from Dreamhost to Slicehost. If you&#8217;ve used Slicehost then you may appreciate how time consuming it can be to install and build a web server from scratch, but I&#8217;m glad I made the move.</p>
<p>Also while moving my web [...]]]></description>
			<content:encoded><![CDATA[<p>Some content is missing from my previous blog posts at the moment as i&#8217;ve moved my hosting from Dreamhost to Slicehost. If you&#8217;ve used Slicehost then you may appreciate how time consuming it can be to install and build a web server from scratch, but I&#8217;m glad I made the move.</p>
<p>Also while moving my web hosting I shifted my email over to google apps, which is a massive pain if you&#8217;ve somehow managed to retain over 10 years worth of personal emails. On the plus side I&#8217;ve quickly rewritten my home page to use rails, which was surprising painless <img src='http://blog.magudia.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Finally like a complete idiot I didn&#8217;t actually back up everything I thought I had so somethings have vanished into the ether, although I&#8217;m hoping I have a older (more complete) backup somewhere  :-(</p>
<p>Give me a little time to sort the broken links.</p>
<p>Sorry!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2009/07/19/slicehost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UpYourAlley</title>
		<link>http://blog.magudia.com/2008/12/18/upyouralley/</link>
		<comments>http://blog.magudia.com/2008/12/18/upyouralley/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 14:18:18 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[PA]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/?p=62</guid>
		<description><![CDATA[<p>Just an update from my previous post. I&#8217;ve updated my little mashup to be a lot faster than it was and I still have a few optimizations in mind to speed it up even more. Also the site now handles any UK location (well the ones which google maps can geocode into a longitude and [...]]]></description>
			<content:encoded><![CDATA[<p>Just an update from my previous post. I&#8217;ve updated my little mashup to be <strong>a lot faster</strong> than it was and I still have a few optimizations in mind to speed it up even more. Also the site now handles any UK location (well the ones which google maps can geocode into a longitude and latitude) and finally I gave it a humorous name (well I found it funny).</p>
<p>Here&#8217;s the link again: <a title="UpYourAlley" href="http://listings.magudia.com" onclick="pageTracker._trackPageview('/outgoing/listings.magudia.com?referer=');">UpYourAlley</a> give the site a few seconds to load the markers and the same applies when you click on any marker.</p>
<p>Still there are a few little bugs and niggles that I need to sort out:</p>
<ul>
<li>If more than one venue is at the same location then only one is currently shown.</li>
<li>The marker manager code I have isn&#8217;t as efficient and smart as I would like especially when scrolling around the map.</li>
<li>I would like to be able to filter (on a search) events by category i.e. movies, arts, gigs etc&#8230;, but that should be trivial.</li>
<li>More user feedback when loading data and handling failure when the users location cannot be geocoded.</li>
<li>Plus more, more and then some more&#8230;</li>
</ul>
<p>For those who care about why it&#8217;s faster now&#8230;. I previously generating the data set completely in PHP on the server-side, but as each api request was made in series to PA the time taken to gather just the venue data took around 15 seconds and when factoring in the events data for each venue this grew to minutes. So when I rewrote the site (waiting for Top Gear at 9pm on sunday night &#8211; I thought it started at 8pm!) I set all the requests* to be sent asynchronous from the client using jquery and surprise surprise everything ran faster, although more bandwidth is used and more requests are made in total.</p>
<p>* The requests are still proxied through PHP to PA as I strip out and sort some data as well as hiding the API key that I use.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/12/18/upyouralley/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s happening near Balham</title>
		<link>http://blog.magudia.com/2008/12/10/whats-happening-near-balham/</link>
		<comments>http://blog.magudia.com/2008/12/10/whats-happening-near-balham/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 16:06:57 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JMaps]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Map]]></category>
		<category><![CDATA[PA Listings]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/?p=52</guid>
		<description><![CDATA[<p>I&#8217;ve been allowed to play around with a new web service developed by some former colleagues at the Press Association (PA). The service gives you some access to PA&#8217;s entertainment listings database (think guardian guide, listings section of the Metro and most other papers etc. it all comes from the same source).</p>
<p>The data is organized into venues (your local [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been allowed to play around with a new web service developed by some former colleagues at the Press Association (PA). The service gives you some access to PA&#8217;s entertainment listings database (think guardian guide, listings section of the Metro and most other papers etc. it all comes from the same source).</p>
<p>The data is organized into venues (your local arts center), titles (a movie on nationwide release) and events (a title and venue combination at a specific start/end times). Or for the more data minded venues can have zero to many titles, titles can have zero to many venues, events have an unique combination of one title, one venue and a date &amp; time.</p>
<p>Anyway to quickly try out the new service I knocked up a quick mashup of what events are on in my local area each day. Firstly this mashup is <strong>massively slow</strong> as my host doesn&#8217;t have memcached installed for personal use *cough* Dreamhost *cough*. This is also partially due to the structure of the web service as I have to make a lot of requests to generate this mashup, but I&#8217;ll keep that feedback confidential for now as the web service isn&#8217;t complete nor open to external use yet.</p>
<p>Anyway here&#8217;s the link: <a title="http://listings.magudia.com" href="http://listings.magudia.com" onclick="pageTracker._trackPageview('/outgoing/listings.magudia.com?referer=');">http://listings.magudia.com</a> (please give it a minute or two to load the data &#8211; yes really).</p>
<p>Once I get some time to play with it some more</p>
<ul>
<li>I&#8217;ll open up the map to allow users to select their own local area</li>
<li>Have some dynamic marker loading on scrolling</li>
<li>Allow options to select which days to look for events (apart from today)</li>
<li>Filter by event types (only gigs, cinemas, comedy or combinations thereof).</li>
<li>Show more venue information</li>
<li>Optionally show more information about the event or title</li>
<li>Refactor, refactor, refactor&#8230;</li>
</ul>
<div>For those interested the site uses jquery &amp; the jmaps plugin to generate the map and gather data from a simple PHP proxy script which collates the data from PA into a JSON.</div>
<div>I can&#8217;t overstate how big a step forward this is for PA and hopefully we&#8217;ll see more of this from them in the future.</div>
<div><strong>UPDATE:</strong> As always the moment you publish something is exactly the same moment you figure out how to fix the problem your having. I should be able to massively speed up the site, but I&#8217;m not going to do that today.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/12/10/whats-happening-near-balham/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iBlog</title>
		<link>http://blog.magudia.com/2008/09/08/iblog/</link>
		<comments>http://blog.magudia.com/2008/09/08/iblog/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 16:52:02 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/09/08/iblog/</guid>
		<description><![CDATA[<p>Testing out wordpress from iPhone. Is there a phrase for mobile blogging&#8230; Mologging? Moblogging? Or my favourite so far mogging  </p>
<p>It&#8217;s also made me *finally* upgrade to the latest version of WordPress!</p>
]]></description>
			<content:encoded><![CDATA[<p>Testing out wordpress from iPhone. Is there a phrase for mobile blogging&#8230; Mologging? Moblogging? Or my favourite so far mogging <img src='http://blog.magudia.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>It&#8217;s also made me *finally* upgrade to the latest version of WordPress!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/09/08/iblog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtualizing Balham</title>
		<link>http://blog.magudia.com/2008/08/24/virtualizing-balham/</link>
		<comments>http://blog.magudia.com/2008/08/24/virtualizing-balham/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 12:10:20 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Balham]]></category>
		<category><![CDATA[PhotoSynth]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/08/24/virtualizing-balham/</guid>
		<description><![CDATA[<p>Last year I saw a online presentation from the TED conference about a Microsoft Labs project called Photosynth. When I saw the lecture I thought it was probably the most interesting thing I&#8217;ve seen come out of Microsoft in ages. This technology really impressed me as it gives anyone the ability to create a pseudo 3D image map [...]]]></description>
			<content:encoded><![CDATA[<p>Last year I saw a online presentation from the <a title="TED" href="http://www.ted.com/index.php/talks/blaise_aguera_y_arcas_demos_photosynth.html" onclick="pageTracker._trackPageview('/outgoing/www.ted.com/index.php/talks/blaise_aguera_y_arcas_demos_photosynth.html?referer=');">TED</a> conference about a <a title="Microsoft Live Labs" href="http://livelabs.com/" onclick="pageTracker._trackPageview('/outgoing/livelabs.com/?referer=');">Microsoft Labs</a> project called <a title="PhotoSynth" href="http://photosynth.net/Default.aspx" onclick="pageTracker._trackPageview('/outgoing/photosynth.net/Default.aspx?referer=');">Photosynth</a>. When I saw the lecture I thought it was probably the most interesting thing I&#8217;ve seen come out of Microsoft in ages. This technology really impressed me as it gives anyone the ability to create a pseudo 3D image map of any space as long as you had enough pictures to generate it.</p>
<p>So now over a year after I first saw it Microsoft have released a version where anyone can create and upload their own Photosynth (I&#8217;m not too sure I like the name) and early this wet August Sunday morning I went out and give it a go near my local station. Anyone can view it providing that they&#8217;re using Windows preferably with IE7 or Firefox3 (no mac support yet, so I had to use vmware to view and create this &#8211; mac support is in the works apparently?!?).</p>
<p><span style="text-decoration: underline;"><a title="Virtual Balham" href="http://photosynth.net/view.aspx?cid=48faf711-c989-4610-914d-8f204a357e45" onclick="pageTracker._trackPageview('/outgoing/photosynth.net/view.aspx?cid=48faf711-c989-4610-914d-8f204a357e45&amp;referer=');">http://photosynth.net/view.aspx?cid=48faf711-c989-4610-914d-8f204a357e45</a></span></p>
<p>After it finally generated and uploaded to the PhotoSynth website I was fairly happy with my results for a first try, but I wish I&#8217;d taken more photos from more points and from different distances to really show what I think this technology can do. Then again I did take over 120 photos, but I reckon to do it well I might need 4 or 5 times that! A few things I wish they could add are:</p>
<ul>
<li>A better editor for more control over the end result as currently you have to upload the photos online and hope it all works.</li>
<li>The ability to add more photos over time to a current set of photos would allow me to gradually expand the detail and scope of the synth.</li>
<li>Geotagging of sythn&#8217;s so they could be placed onto a mapping service.</li>
</ul>
<p>But over all if you like taking pictures then this is a new fun toy to play with&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/08/24/virtualizing-balham/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just another javascript flickr mashup&#8230;</title>
		<link>http://blog.magudia.com/2008/05/25/just-another-javascript-flickr-mashup/</link>
		<comments>http://blog.magudia.com/2008/05/25/just-another-javascript-flickr-mashup/#comments</comments>
		<pubDate>Sun, 25 May 2008 12:44:21 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Lightbox2]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/05/25/just-another-javascript-flickr-mashup/</guid>
		<description><![CDATA[Why? 
<p>Over the last few weeks i&#8217;ve moved over all my pictures from my php gallery to flickr, so now I really need to replace my hosted gallery with something better than a link to my flickr account. My solution to this was to create (what I think is) a nice little mashup of flickr hosted based pictures and a javascript [...]]]></description>
			<content:encoded><![CDATA[<h3>Why? </h3>
<p>Over the last few weeks i&#8217;ve moved over all my pictures from my <a href="http://gallery.magudia.com" onclick="pageTracker._trackPageview('/outgoing/gallery.magudia.com?referer=');">php gallery</a> to <a title="flickr" href="http://www.flickr.com/photos/milanm/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/milanm/?referer=');">flickr</a>, so now I really need to replace my hosted gallery with something better than a link to my flickr account. My solution to this was to create (what I think is) a nice little <a href="http://flickrwall.magudia.com" onclick="pageTracker._trackPageview('/outgoing/flickrwall.magudia.com?referer=');">mashup</a> of flickr hosted based pictures and a javascript visulisation of them. Rather than use one of the many flickr mashup&#8217;s out there I decided it was more fun to wrote my own&#8230;Simply i&#8217;ve taken 36 square thumbnails arranged in a 9&#215;4 grid from flickr and used a combination of prototype, cube (with some modifications), lightbox2 with some javascript glue of my own to bind them together.</p>
<h3>What does it do&#8230;</h3>
<p>Well it&#8217;s easier to <a href="http://flickrwall.magudia.com" onclick="pageTracker._trackPageview('/outgoing/flickrwall.magudia.com?referer=');">see it</a>, but every second or two a randomly selected thumbnail in the 9&#215;4 grid will rotate to a new picture from flickr and then this repeats forever. You can also click on any of the thumbnails in the grid to hightlight a picture and eventually i&#8217;ll provide a link to where that photo is hosted on flickr, once a figure out a better way to do it than to put the link into the title.</p>
<h3>How&#8217;s it work&#8230;</h3>
<p>Well i&#8217;m using a php script on my server to get a selection of photo details using <a title="phpFlickr" href="http://phpflickr.com/" onclick="pageTracker._trackPageview('/outgoing/phpflickr.com/?referer=');">phpFlickr</a>; I decided to get 72 photo objects ever time I accessed to script, but on the initial load I display the first 36 onto the page. I used <a title="prototype" href="http://www.prototypejs.org/" onclick="pageTracker._trackPageview('/outgoing/www.prototypejs.org/?referer=');">prototype</a> to handle the Ajax request and json parsing, I guess I could I done this without prototype, but I couldn&#8217;t be bothered and it would have taken longer and lightbox2 requires it anyway! Then using a javascript <a title="Image cube animation" href="http://www.kawa.net/works/js/animation/cube-e.html#note" onclick="pageTracker._trackPageview('/outgoing/www.kawa.net/works/js/animation/cube-e.html_note?referer=');">image cube animation</a> library I found this will animate a image rotation to a new picture from the remaining 36 pictures. Although I did have to modify the cube library a bit to use absolute positioning and setting some divs to be inline apart from the first thumbnail of the row. Once the page has runout of pictures from the initial server script load a new call is made to that script for another page of 72 picture objects from flickr &#8230; and so on &#8230; and so on &#8230; I also used <a title="lightbox2" href="http://www.lokeshdhakar.com/projects/lightbox2/" onclick="pageTracker._trackPageview('/outgoing/www.lokeshdhakar.com/projects/lightbox2/?referer=');">lightbox2</a> to load up a larger version of the square thumbnail when you click on the thumbnail.</p>
<h3><span style="font-size: 16px; font-weight: normal">Y</span><span style="font-size: 16px; font-weight: normal">ou didn&#8217;t take those pictures&#8230;</span></h3>
<p>At the moment I&#8217;m just using the interesting pictures from flickr (they look better than mine), but once I fix the odd bug or few I&#8217;ll replace my hosted gallery to a nicer version of this mashup using my own pictures. Phew! PS Thanks <a title="FireBug" href="http://www.getfirebug.com/" onclick="pageTracker._trackPageview('/outgoing/www.getfirebug.com/?referer=');">firebug</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/05/25/just-another-javascript-flickr-mashup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What next?</title>
		<link>http://blog.magudia.com/2008/04/15/what-next/</link>
		<comments>http://blog.magudia.com/2008/04/15/what-next/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 21:52:29 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/04/15/what-next/</guid>
		<description><![CDATA[<p>So I thinking of writing a new website project in Ruby (probably Rails), but I&#8217;m stuck on an actual idea. I know what I want to play with:</p>

Languages: Ruby on Rails, JavaScript
DB: MySQL (as Dreamhost doesn&#8217;t have PostGres)Â 
Test frameworks: rSpec, Selenium
CI: CruiseControl.rb

<p>At the moment I&#8217;m thinking of porting the lovely RoundCube mail project from PHP [...]]]></description>
			<content:encoded><![CDATA[<p>So I thinking of writing a new website project in Ruby (probably Rails), but I&#8217;m stuck on an actual idea. I know what I want to play with:</p>
<ul>
<li>Languages: Ruby on Rails, JavaScript</li>
<li>DB: MySQL (as Dreamhost doesn&#8217;t have PostGres)Â </li>
<li>Test frameworks: rSpec, Selenium</li>
<li>CI: CruiseControl.rb</li>
</ul>
<p>At the moment I&#8217;m thinking of porting the lovely RoundCube mail project from PHP to Rails, it&#8217;s something that uses concepts that i&#8217;m fairly familiar with i.e. email protocols and I guess i&#8217;ve never been all that happy with any self-hosted web mail client, so I guess it&#8217;s time to put up or shut up and build my own. Obviously I want to refresh/update my Ruby and JavaScript skills and it&#8217;s associated agile components as well. Also as i&#8217;m using rSpec i&#8217;ll try and develop the project using BDD, but how i&#8217;m going to map business value priorities to a web email client could pose some interesting questions, although mapping behavior in tests might work better with the way I think &#8230; I think <img src='http://blog.magudia.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  It&#8217;s not all that exciting, but if anyone has any other suggestions then just add a comment and i&#8217;ll consider it?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/04/15/what-next/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Storage Service (You&#8217;ve Come a Long Way, Baby)</title>
		<link>http://blog.magudia.com/2008/03/26/simple-storage-service-youve-come-a-long-way-baby/</link>
		<comments>http://blog.magudia.com/2008/03/26/simple-storage-service-youve-come-a-long-way-baby/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 10:54:57 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SimpleStorageService]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[Simple Storage Service]]></category>
		<category><![CDATA[SOAP]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/03/26/simple-storage-service-youve-come-a-long-way-baby/</guid>
		<description><![CDATA[<p>It&#8217;s taking a few weeks of cooking, but my Simple Storage Service is ready to come out of the oven to be eaten (and possibly spat out) by the world at large. Now there are still a couple of things on my TODO list, but nothing massive. Basically URL authentication of requests (needs some thought), [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s taking a few weeks of cooking, but my Simple Storage Service is ready to come out of the oven to be eaten (and possibly spat out) by the world at large. Now there are still a couple of things on my TODO list, but nothing massive. Basically <a title="See bottom of this page" href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAuthentication.html" onclick="pageTracker._trackPageview('/outgoing/docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAuthentication.html?referer=');">URL authentication of requests</a> (needs some thought), <a title="postObject" href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAuthentication.html" onclick="pageTracker._trackPageview('/outgoing/docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAuthentication.html?referer=');">postObject</a> (I need to read the docs), <a title="Virtual hosting of buckets" href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/VirtualHosting.html" onclick="pageTracker._trackPageview('/outgoing/docs.amazonwebservices.com/AmazonS3/2006-03-01/VirtualHosting.html?referer=');">virtual hosting of buckets</a> (a lot of thought) and some tiny changes and bugs that i&#8217;ll fix over the next few days. So what has changed since my last post:</p>
<ul>
<li>Anonymous requests can now be made where permission to do so has been set.</li>
<li>Authenticated/Alluser groups and ACL get and sets have been  implemented.</li>
<li>All REST calls have been implemented (except postObject)*</li>
<li>Exception handling matches the <a title="S3 Exceptions" href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorCodeList.html" onclick="pageTracker._trackPageview('/outgoing/docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorCodeList.html?referer=');">S3 documentation</a> (with some guess work)</li>
<li>The REST layer was completely rewritten using test driven development</li>
<li><a title="phpDocumentator" href="http://www.phpdoc.org/" onclick="pageTracker._trackPageview('/outgoing/www.phpdoc.org/?referer=');">phpDocumentator</a> comments are being added to the code, so docs can be generated</li>
<li>I&#8217;ve created a web form to help you create new users to the service</li>
</ul>
<p>So what&#8217;s next &#8230;. ? I guess I&#8217;ll polish what&#8217;s been completed so far and add some documentation to make it simpler to deploy. And as i&#8217;m off Snow boarding from Saturday i&#8217;ll wait to see what sort of feedback I get before getting started on the SOAP section which should be easier now that I&#8217;ve got a good testing setup + looking for a new job as i&#8217;ll be leaving mine soon! I&#8217;ve also found that the most popular <a title="PHP S3 client" href="http://neurofuzzy.net/2006/08/26/amazon-s3-php-class-update/" onclick="pageTracker._trackPageview('/outgoing/neurofuzzy.net/2006/08/26/amazon-s3-php-class-update/?referer=');">php client for S3</a> (from a google search) is missing some useful functionality, so i&#8217;m pondering re-writing it and making several optimizations so it can stream downloads from S3 etc etc&#8230;</p>
<p>The best use for this software, apart from academic curiosity and mocking is probably a failover/backup service incase S3 goes down (which it has done). This would work best if you are CNAME record to map to s3.amazonaws.com as I believe that as this is under your DNS control it is fairly trivial to map it to another host.</p>
<p>Other than that I&#8217;ll write a blog on how to set it up using <a title="XAMPP for Windows" href="http://www.apachefriends.org/en/xampp-windows.html" onclick="pageTracker._trackPageview('/outgoing/www.apachefriends.org/en/xampp-windows.html?referer=');">xampp on windows</a> and <a title="MacPorts" href="http://www.macports.org/" onclick="pageTracker._trackPageview('/outgoing/www.macports.org/?referer=');">macports</a> on a mac (when I MacBook Pro arrives)&#8230;</p>
<p>You can checkout the latest code from here: <a title="S3Server" href="http://svn.magudia.com/s3server" onclick="pageTracker._trackPageview('/outgoing/svn.magudia.com/s3server?referer=');"><span style="text-decoration: line-through;">http://svn.magudia.com/s3server</span></a></p>
<p>UPDATE: svn is broke since I moved to slicehost, you can download the code here: <a href="http://projects.magudia.com/s3server.zip" onclick="pageTracker._trackPageview('/outgoing/projects.magudia.com/s3server.zip?referer=');">http://projects.magudia.com/s3server.zip</a></p>
<p>* As this service hasn&#8217;t been developed to work to meet Amazon&#8217;s data consistency model I implemented getBucketLocation, but essentially it does nothing. Although in theory I could use MySQL clustering to implement this I&#8217;m not going to unless someone wants to pay me and I also don&#8217;t have a global server network to play with <img src='http://blog.magudia.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/03/26/simple-storage-service-youve-come-a-long-way-baby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specifications</title>
		<link>http://blog.magudia.com/2008/03/24/specifications/</link>
		<comments>http://blog.magudia.com/2008/03/24/specifications/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 20:43:50 +0000</pubDate>
		<dc:creator>milan</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[SimpleStorageService]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Simple Storage Service]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[Specifications]]></category>

		<guid isPermaLink="false">http://blog.magudia.com/2008/03/24/specifications/</guid>
		<description><![CDATA[<p>I recently read one of Joel&#8217;s blogs on still how difficult it is to reverse engineer a Microsoft Office document even though Microsoft have now released their specification&#8217;s on the formats. Now the problems I&#8217;ve been facing are in no way on the order of magnitude of any developer attempting to reverse engineer one of [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read one of <a href="http://www.joelonsoftware.com/items/2008/02/19.html" onclick="pageTracker._trackPageview('/outgoing/www.joelonsoftware.com/items/2008/02/19.html?referer=');">Joel&#8217;s</a> blogs on still how difficult it is to reverse engineer a Microsoft Office document even though Microsoft have now released their specification&#8217;s on the formats. Now the problems I&#8217;ve been facing are in no way on the order of magnitude of any developer attempting to reverse engineer one of Microsoft&#8217;s Office documents, but as some of you may know I&#8217;ve been attempting (mostly with success &#8211; more tomorrow on that) to create a clone of the Amazon S3 service from their freely published documentation.</p>
<p>The problem is that it&#8217;s quite easy to replicate the &#8216;happy path&#8217; of the specification as that&#8217;s been quite clearly documented, but when you try and recreate how and when different errors are thrown from just the documentation things become a little bit more murky. Say the document states that it throws different errors depending on if the Content-MD5 or the Content-Length don&#8217;t match was calculated by what was received by the service, then how do you know which will get sent first as it&#8217;s quite likely if one condition fails then the other will also fail? The specification doesn&#8217;t answer this, but my answer is that it&#8217;s probably best that it shouldn&#8217;t and these sort of questions are best left to developer forums as sometimes a specification can so detailed that no-one ever reads it!</p>
<p>Then today I was thinking on my way to my parents house that maybe I was wrong to create the back end database layer first and I should have stuck with a contract first approach, but later on my way home I remembered the reason I didn&#8217;t: The Amazon S3 REST service doesn&#8217;t have a contract, it has documentation &#8211; which simply isn&#8217;t the same. The S3 SOAP service does have a contract of sorts &#8211; it&#8217;s WSDL, but even that doesn&#8217;t help you recreate/describe the &#8216;unhappy path&#8217; of the underlying service. The only real way you can do this is to write tests against the real service and hope they (the people who own the service) don&#8217;t change it much and your tests map out most of the potential paths which exist. Even better if the specification came with a downloadable set of software tests (JUnit et al) then that would make building a client even easier &#8230; a baseline reference implementation of sorts.</p>
<p>Simply contract first development works well when you own the software behind the contract and the contract itself. I&#8217;m not fully convinced it works as well when you have neither and your trying to clone a service. I could write tests against S3, but they would mean signing up and possibly breaking the T&amp;C&#8217;s, but this project wasn&#8217;t to threaten S3 or get sued, but to understand it and the fundamental principles of well behaved web based services it bases itself on. I guess I&#8217;m someone who likes to take things apart to see how it works and that&#8217;s what I&#8217;ve done.</p>
<p>Also from my current experience it&#8217;s harder to develop a REST service than it is &#8216;in theory&#8217; a SOAP service; BUT I think a REST service is easier to consume by clients of the service than SOAP. Simply because SOAP has massive interoperability problems between tool kits as the SOAP specification it itself ambiguous and are in small parts incompatible with several languages and REST simply has none of this because it based on the great <a title="RFC 2616" href="http://www.faqs.org/rfcs/rfc2616.html" onclick="pageTracker._trackPageview('/outgoing/www.faqs.org/rfcs/rfc2616.html?referer=');">HTTP RFC 2616</a> which the entire web is based on (including the majority of SOAP based services).</p>
<p>I have no solutions, just more questions and that generally isn&#8217;t a bad thing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.magudia.com/2008/03/24/specifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
