<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>OneWheeledBicycle</title>
	<atom:link href="http://onewheeledbicycle.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://onewheeledbicycle.wordpress.com</link>
	<description>Random mutterings of Alastair James</description>
	<lastBuildDate>Thu, 12 Jan 2012 14:31:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='onewheeledbicycle.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>OneWheeledBicycle</title>
		<link>http://onewheeledbicycle.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://onewheeledbicycle.wordpress.com/osd.xml" title="OneWheeledBicycle" />
	<atom:link rel='hub' href='http://onewheeledbicycle.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Getting started with Neo4J REST API and PHP</title>
		<link>http://onewheeledbicycle.wordpress.com/2010/06/01/getting-started-with-neo4j-rest-api-and-php/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2010/06/01/getting-started-with-neo4j-rest-api-and-php/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 22:57:34 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Neo4J]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=29</guid>
		<description><![CDATA[Hurrah! The excellent graph database Neo4J has made early steps towards escaping its embedded Java roots and behaving more like the client/server model most of us LAMP developers understand. Previous attempts to integrate Neo into PHP applications relied on complex PHP/Java bindings that meant that Java had to run on the same machine, or you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=29&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hurrah! The excellent graph database Neo4J has made early steps towards escaping its embedded Java roots and behaving more like the client/server model most of us LAMP developers understand. Previous attempts to integrate Neo into PHP applications relied on complex PHP/Java bindings that meant that Java had to run on the same machine, or you had to write your own glue in between PHP and Java using some kind network protocol.</p>
<p>Now however, they have released an initial version of an official HTTP REST API. No more magic and glue. Just good old HTTP.</p>
<p>In order to simplify interacting with the Neo REST server from PHP, I knocked up a little PHP client library for it. Its early days for the Neo REST server and its even earlier days for the PHP client, so use with care!</p>
<p>Firstly, head over to the <a href="http://wiki.neo4j.org/content/Getting_Started_REST">Neo wiki</a> for information on how to get the Neo REST server installed and running. This will guide you through the basics of interacting with the REST API via HTTP using your web browser and command line tools (e.g. CURL).</p>
<p>Once you have it running and have poked it and prodded it using your webbrowser and / or the command line, its time to get going with PHP!</p>
<p><strong>Getting started with Neo REST server and PHP</strong></p>
<p>Head over to the <a href="http://github.com/onewheelgood/Neo4J-REST-PHP-API-client">github page</a> for the PHP client and download it. If you are familiar with git, you may as well grab the latest version, otherwise I have zipped up a <a href="http://github.com/downloads/onewheelgood/Neo4J-REST-PHP-API-client/Neo4J-REST-PHP-API-client.v0.1.zip">version here</a>.</p>
<p>Make sure you have the Neo REST server running (its best to start the demo with a empty server so all the node numbers match my examples) and navigate into the directory where you downloaded the PHP client. Type &#8216;php demo.php&#8217; to run the  demo file.</p>
<p>If all has gone well, 3 nodes will be added with relationships between then, and you will be presented with a textual diagram representation in the shell window.</p>
<p>To confirm it works, you can view the nodes in your browser (http://localhost:9999/node/1, http://localhost:9999/node/2, http://localhost:9999/node/3).</p>
<p>So, if it worked, I suggest you open the &#8216;demo.php&#8217; script and see how it works!</p>
<p><strong><br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=29&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2010/06/01/getting-started-with-neo4j-rest-api-and-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>HTML layouts. Ideal solution, idea 1.</title>
		<link>http://onewheeledbicycle.wordpress.com/2009/02/05/html-layouts-ideal-solution-idea-1/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2009/02/05/html-layouts-ideal-solution-idea-1/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 10:09:28 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=26</guid>
		<description><![CDATA[Following on from the CSS v tables for layout debate that is raging (continuously). As detailed in my previous post I feel that a HTML page is the combination of the content and layout. I.e. layout elements (multiple unnecessary divs in the case of CSS, tables in the case of table layouts) should be separate from the content. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=26&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following on from the CSS v tables for layout debate that is raging (continuously). As detailed in my <a href="http://onewheeledbicycle.com/2009/02/05/page-document-layout/">previous post</a> I feel that a HTML page is the combination of the content and layout. I.e. layout elements (multiple unnecessary divs in the case of CSS, tables in the case of table layouts) should be separate from the content. However that does not actually help with how to get your HTML laid out.</p>
<p>So I am going to mind dump a few possible ways layout could be done. These are not serious suggestions, just ideas.</p>
<p>The first approach is by far the most unlikely. Why? Well it requires extensions to CSS which, as we know, could take a decade to reach our IE6 using friends.</p>
<p>So the basic problem of layouts is that we want to divide our page into distinct areas. A typical layout might look like this (image from java2s.com):</p>
<p><img src="http://www.java2s.com/Tutorial/JavaImages/BorderLayoutExample.PNG" alt="" width="400" height="300" /></p>
<p>This is called a &#8216;Border Layout&#8217; (in java terminology at least). For example, you might want to have the header in the &#8216;North&#8217; section, a sidebar in the &#8216;East&#8217; section, your footer in the &#8216;South&#8217; section and your content in the &#8216;Center&#8217; section. You might not use all sections (i.e. we might not put anything in the West section) at which point it is not rendered. So this is a very flexible layout, able to do two and three columns, and can probably account for 95% of all web layouts out there. There are other basic layout types, and I think that with a few pre-defined layouts you could cover the vast majority of layouts with ease.</p>
<p>Imagine if we had a new CSS attribute in the body element:</p>
<p><code>body{<br />
layout-manager: border-layout;<br />
}</code></p>
<p>Ok, so we have said to the browser, we would like to render this page using the border layout model as detailed about. How do we add content to each section?</p>
<p><code><br />
div#navigation{<br />
position: layout;<br />
layout-position: east;<br />
}<br />
</code></p>
<p>Hmmm, easy hey? Using the CSS file we can assign page elements to the different layout sections. Of course the problem with this is that it limits you to a pre-defined set of layouts. You could probably use the <a href="http://www.w3.org/TR/css3-layout/">CSS3 layouts</a> module to define your own.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=26&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2009/02/05/html-layouts-ideal-solution-idea-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>

		<media:content url="http://www.java2s.com/Tutorial/JavaImages/BorderLayoutExample.PNG" medium="image" />
	</item>
		<item>
		<title>Page = Document + Layout</title>
		<link>http://onewheeledbicycle.wordpress.com/2009/02/05/page-document-layout/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2009/02/05/page-document-layout/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 09:19:35 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=25</guid>
		<description><![CDATA[The old debate of CSS v tables has flared up once again (see here and here). Its the same old arguments over and over. However, the very fact that this keeps coming around is evidence that both tools have problems.  Generally, I think CSS is great at styling content. It was designed to style text [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=25&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The old debate of CSS v tables has flared up once again (see <a href="http://www.flownet.com/ron/css-rant.html">here</a> and <a href="http://www.newmediacampaigns.com/page/why-css-should-be-used-for-layout">here</a>). Its the same old arguments over and over. However, the very fact that this keeps coming around is evidence that both tools have problems. </p>
<p>Generally, I think CSS is great at styling content. It was designed to style text based documents, you can see that from the DTP inspired terminology. For example, floats are designed to float paragraphs of text around images, not for making left and right columns on your page. In short, I think layout in CSS is a hack, using CSS for something it was not designed to do, exactly as using tables for layout is also a hack.</p>
<p>So we have to choose between two wrongs right? What would be the ideal situation?</p>
<p>Look at the average website. Most pages have common layout and header elements. Looking at the source code, often only a small fragment of the HTML is actually for content. The rest are &#8216;layout&#8217; elements that are constant across most pages in the site. So I think, in essence a HTML page is the union of two components, the content (the document in my mind) and the layout (the navigation, header, the search bar thats on every page). Look at this site. Only one small area corresponds to content (the blog post area) and the rest is my overly large sidebar, header and flickr photo stream. Not to mention all the divs or whatever to float the sidebar to the right etc&#8230;  </p>
<p>Why is this a problem? Many non-standard uses of HTML (screen readers, search engine crawlers) have great problems separating the &#8216;content&#8217; of the page from other secondary elements. SEO teaches us that we should have our &#8216;content&#8217; as near to the top of the HTML as possible, and we have great fun trying to hack our CSS layouts so that order is unimportant in the HTML. Search engines also tend to devalue links in &#8216;layout&#8217; elements (i.e. sidebars) compared to &#8216;in-content&#8217; links. Why? Because a link in a layout element tends to occur on all pages in the site, where as a in-text link means that I am actually talking about that page there and then.</p>
<p>To me, this suggests that the most semantic solution would be to somehow separate the content from the layout elements. Therefore, each URI on the site corresponds to a small semantically relevant HTML document that is just the content for that URI. Layout elements could either be &#8216;included&#8217; from external files in a similar way to the CSS @import directive, or marked as being &#8216;secondary&#8217; content. </p>
<p>You can achieve similar results on the server side by including document fragments in whatever server side programming language you wish. This is not quite the same though as the full document (including layout elements) is sent to the client. I want to be able to do it sending just the content. Interesting, good old fashioned frames actually allowed us to this. I.e. in a frameset I could have one HTML docuument for the content and one for the layout elements. However, frames are awful and have a bunch of usability issues.</p>
<p>Obviously this is a pie-in-the-sky idea as it would require a standard to be defined and incorporated in the browsers. That could take years, even decades in IE&#8217;s case. The debate on tables v CSS is centred around which tool is best to use today, not in the distant future. </p>
<p>That said, I am looking at an approach to do this &#8216;layout functionality&#8217;  in javascript on the client before the page is rendered. Watch this space&#8230;</p>
<p>UPDATE: I realise I did not actually talk about HOW the layout might be achieved. <a href="http://onewheeledbicycle.com/2009/02/05/html-layouts-ideal-solution-idea-1/">Here is an idea</a> (and just and idea).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=25&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2009/02/05/page-document-layout/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>Why I am digging the Malo CSS framework</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/11/18/why-i-am-digging-the-malo-css-framework/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/11/18/why-i-am-digging-the-malo-css-framework/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 18:49:18 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=24</guid>
		<description><![CDATA[I recently found out about malo, a ultra small CSS grid layout library. When I say ultra small, I mean ultra small, 0.25k compressed! It supports various numbers of columns and page widths, and most impressively, nested columns. So if you need a CSS column library that works in all browsers, check it out. Its [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=24&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently found out about <a href="http://code.google.com/p/malo/">malo</a>, a ultra small CSS grid layout library. When I say ultra small, I mean ultra small, 0.25k compressed! It supports various numbers of columns and page widths, and most impressively, nested columns. So if you need a CSS column library that works in all browsers, check it out. Its not as complete as Blueprint, but then, I think Blueprint has lost its way and tries to do far too much.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=24&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/11/18/why-i-am-digging-the-malo-css-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>Please Google, can we have Google Maps API for iPhone?</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/09/25/please-google-can-we-have-google-maps-api-for-iphone/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/09/25/please-google-can-we-have-google-maps-api-for-iphone/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 09:03:15 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Google maps]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=23</guid>
		<description><![CDATA[I have recently been experimenting with writing travel related web apps for the iphone. Its all great. Some of the HTML5 stuff in the new version of iPhone Safari is great (local databases etc..). However, one thing has been bothering me. I cant use Google Maps as I would like to. Ok, I can include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=23&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have recently been experimenting with writing travel related web apps for the iphone. Its all great. Some of the HTML5 stuff in the new version of iPhone Safari is great (local databases etc..). However, one thing has been bothering me. I cant use Google Maps as I would like to. Ok, I can include links to the google maps site that open in the native google maps application, but this is not optimal because:</p>
<ul>
<li>It takes the user out of my web application</li>
<li>Does not allow me to integrate the maps with my application. I.e. add many markers. Do something when a marker is clicked.</li>
</ul>
<p>So this got me thinking, would it be possible to do a &#8216;lite&#8217; version of the javascript maps API for the iPhone? Before the newest version of mobile Safari, this would not have been possible. Fundamentally you cant drag the map! However, with the new version Apple introduced a javascript API for sensing single and double finger drag events. </p>
<p>So, I went about knocking up a very <a href="http://www.worldreviewer.com/crud/iphone/map2.html">basic test version</a> (try it on your iphone, tinyurl: http://tinyurl.com/3g5tg4). Is buggy, basic and sub-optimal, but proves it could work nicely. Try zooming with the double finger pinch action! </p>
<p>I also tried the new webkit CSS transforms to allow free zooming and rotation, however they are buggy and slow on the iphone! Oh well! Anyway, maybe we can have google maps lite on the iphone?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=23&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/09/25/please-google-can-we-have-google-maps-api-for-iphone/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>Dropping pins in google maps!</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/08/21/dropping-pins-in-google-maps/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/08/21/dropping-pins-in-google-maps/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 08:40:35 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Google maps]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=22</guid>
		<description><![CDATA[I am a big fan of the google maps on the iphone. I particularly like the way that the little pins drop from above and bounce. I wanted to find a way to do this in the standard google maps, and after a little hacking, I have found a way. Sadly though, the technique detailed here works [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=22&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of the google maps on the iphone. I particularly like the way that the little pins drop from above and bounce. I wanted to find a way to do this in the standard google maps, and after a little hacking, I have found a way. Sadly though, the technique detailed here works only with the current version of maps. This is because it interfaces directly with the compressed google code, where the function and variable names are randomised (obscured) with each version increase. Thus, to make this work you need to specify the current version number (2.123) in the map file include.</p>
<p>Anyway, to cut a long story short, I figured, that as you can make markers bounce after you drag them, it should be possible to make them bounce in other situations. I was looking for an function named &#8216;bounce&#8217; or similar, but it was a bit harder than that! After tracing the flow through the obscured maps code (!) I found that you can drop a marker from above using the following code:<br />
<code><br />
// Make bouncable<br />
if (!marker.Xa)<br />
{<br />
marker.Xa = true;<br />
marker.qo(false);<br />
}<br />
marker.Pa = height;	// Current height<br />
marker.ri = height;	// Max height<br />
marker.av = 1;		// Direction (+ = down)<br />
marker.tc();		// Go baby!<br />
</code></p>
<p>Here is a demo. The markers also &#8216;hop&#8217; when you move the mouse over them. In the source code there are three functions,  dropMarker, hilightMarker and dehilightMarker. Check them out!</p>
<p>Please, please, please google can we make a publicly available &#8216;bounce&#8217; function?</p>
<p><strong>Update</strong>: Sorry, the demo (<a href="http://www.worldreviewer.com/junk/iphone-map.html">http://www.worldreviewer.com/junk/iphone-map.html</a>) seems to have stopped working. I think the API version that this worked on is too old and not supported anymore!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/onewheeledbicycle.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/onewheeledbicycle.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=22&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/08/21/dropping-pins-in-google-maps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>Only in Brighton&#8230;</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/05/20/only-in-brighton/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/05/20/only-in-brighton/#comments</comments>
		<pubDate>Tue, 20 May 2008 16:19:05 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=21</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=21&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm3.static.flickr.com/2051/2469369586_3403c33b85.jpg?v=0" alt="" width="300" height="400" /></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/onewheeledbicycle.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/onewheeledbicycle.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=21&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/05/20/only-in-brighton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2051/2469369586_3403c33b85.jpg?v=0" medium="image" />
	</item>
		<item>
		<title>An example of good design: Less is more</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/05/17/an-example-of-good-design-less-is-more/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/05/17/an-example-of-good-design-less-is-more/#comments</comments>
		<pubDate>Sat, 17 May 2008 08:51:36 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/?p=17</guid>
		<description><![CDATA[On a recent trip to Dublin I was rather taken by the buttons they have on their pedestrian crossings (yes I know, I am sad): Compare this to the overly engineered UK equivalent: Is it me, or is the main function of this device to have its button pushed? Why then does the UK version have a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=18&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On a recent trip to Dublin I was rather taken by the buttons they have on their pedestrian crossings (yes I know, I am sad):</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2129/2422197705_df5c88c365.jpg?v=0" alt="" height="300" /></p>
<p>Compare this to the overly engineered UK equivalent:</p>
<p><a href="http://onewheeledbicycle.files.wordpress.com/2008/05/050420080152.jpg"><img class="alignnone size-medium wp-image-20" title="050420080152" src="http://onewheeledbicycle.files.wordpress.com/2008/05/050420080152.jpg?w=212&#038;h=300" alt="" width="212" height="300" /></a></p>
<p>Is it me, or is the main function of this device to have its button pushed? Why then does the UK version have a really, really small button that protected by a raised ring to make it even more difficult to push? I love the simplicity of the Irish version. Its main purpose is to be a button, therefore the button is huge and easy to push. Lovely.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/onewheeledbicycle.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/onewheeledbicycle.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=18&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/05/17/an-example-of-good-design-less-is-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2129/2422197705_df5c88c365.jpg?v=0" medium="image" />

		<media:content url="http://onewheeledbicycle.files.wordpress.com/2008/05/050420080152.jpg?w=212" medium="image">
			<media:title type="html">050420080152</media:title>
		</media:content>
	</item>
		<item>
		<title>The beauty of a day off&#8230;</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/03/20/the-beauty-of-a-day-off/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/03/20/the-beauty-of-a-day-off/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 11:29:43 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/2008/03/20/the-beauty-of-a-day-off/</guid>
		<description><![CDATA[Today and Tuesday I have given myself the day off. What a concept. I plan to do no work whatsoever, not even touch my blog (damn! failed already). I am now off to do something I have not done for a long time, read a book! Luxury&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=17&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today and Tuesday I have given myself the day off. What a concept. I plan to do no work whatsoever, not even touch my blog (damn! failed already). I am now off to do something I have not done for a long time, read a book! Luxury&#8230;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/onewheeledbicycle.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/onewheeledbicycle.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=17&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/03/20/the-beauty-of-a-day-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
		<item>
		<title>Geo-targeted content delivery for Amazon S3</title>
		<link>http://onewheeledbicycle.wordpress.com/2008/03/19/geo-targeted-content-delivery-for-amazon-s3/</link>
		<comments>http://onewheeledbicycle.wordpress.com/2008/03/19/geo-targeted-content-delivery-for-amazon-s3/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 10:07:26 +0000</pubDate>
		<dc:creator>aljames</dc:creator>
				<category><![CDATA[AmazonAWS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[World Reviewer]]></category>

		<guid isPermaLink="false">http://onewheeledbicycle.com/2008/03/19/geo-targeted-content-delivery-for-amazon-s3/</guid>
		<description><![CDATA[Amazon S3 is a great service for hosting large media files for your site. At World Reviewer we are soon going to be rolling out our own video hosting for tour operator&#8217;s videos. Video hosting has been an interesting little project, and S3 has really made it easier for us (not to mention cheaper). S3 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=16&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/s3">Amazon S3</a> is a great service for hosting large media files for your site. At <a href="http://www.worldreviewer.com">World Reviewer</a> we are soon going to be rolling out our own video hosting for tour operator&#8217;s videos. Video hosting has been an interesting little project, and S3 has really made it easier for us (not to mention cheaper).</p>
<p>S3 by default hosts files in the US, but it is possible to host content in Europe. One thing we noticed early on, was that videos did not always stream as smoothly when hosted on the American servers and viewed in the UK (and we assume other European countries). Because of this we wanted to offer &#8220;geo-targeting&#8221;, where we can host the files twice, once in America and once in Europe and choose the best based on the user&#8217;s location. Of course, this means we have to pay for storage twice, but typically bandwidth will be the most expensive element of you bill, so a few more cents for extra storage might not be a problem. Well thats how it is for us, you mileage may vary!</p>
<p>It would be great if S3 had geo-targeting by default, but it does not, so how can we offer it?</p>
<p>Actually its quite simple. Basically we will set up two S3 buckets, say &#8220;us.media.worldreviewer.com&#8221; and &#8220;eu.media.worldreviewer.com&#8221; being the American and European buckets respectivly.  We then decide between the two bucket urls based on the users location.</p>
<p>Geo-coding of IP addresses is very easy and free (well at least down to the country level). There are a variety of webservices (like <a href="http://www.hostip.info/">hostip</a>)  however, we wanted something that could run locally, to cut down the delay. <a href="http://www.maxmind.com/">Maxmind</a> offer a free PHP IP to country database called <a href="http://www.maxmind.com/app/geoip_country">GEO lite</a> (they also sell licenses for a more accurate version, but this is good enough for us). You need to download both the data file (GeoIP.dat) and the PHP library file (geoip.php) from that page. Once you have them you can get the country code for any IP address like this:</p>
<p><code><br />
geoip_country_code_by_addr('212.140.189.10'); //returns 'GB'<br />
</code></p>
<p>Easy! Now all we need to do is map European countries to the European bucket url and all others to the American url. This function in <a href="http://onewheeledbicycle.com/wp-content/myuploads/geoTargetS3.zip">this file</a> does just that. Useage:</p>
<p><code><br />
$bucket = '.media.worldreviewer.com';<br />
$bucket = getAmazonS3LocalServer().$bucket;<br />
</code></p>
<p>You can then pass the bucket to your HTML layer to load the media files from the right place. The GeoIP lookup is quite quick, but you are probably better off storing the result in the user&#8217;s session, so that you only have to look it up when the visitor first views a video.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/onewheeledbicycle.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/onewheeledbicycle.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/onewheeledbicycle.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/onewheeledbicycle.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/onewheeledbicycle.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=onewheeledbicycle.wordpress.com&amp;blog=13156602&amp;post=16&amp;subd=onewheeledbicycle&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://onewheeledbicycle.wordpress.com/2008/03/19/geo-targeted-content-delivery-for-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e5e9e57fa0a003dbe37556e07b536497?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aljames</media:title>
		</media:content>
	</item>
	</channel>
</rss>
