<?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>j4mie dot org &#187; Projects</title>
	<atom:link href="http://www.j4mie.org/category/software/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.j4mie.org</link>
	<description></description>
	<lastBuildDate>Tue, 08 Jun 2010 22:10:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Idiorm &#8211; a simple ORM for PHP</title>
		<link>http://www.j4mie.org/2010/06/08/idiorm-a-simple-orm-for-php/</link>
		<comments>http://www.j4mie.org/2010/06/08/idiorm-a-simple-orm-for-php/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 12:57:10 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Design & Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/?p=191</guid>
		<description><![CDATA[
Just a quick update on a little project I&#8217;ve been working on over the past few months. Idiorm is &#8220;a lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5,&#8221; and is released under a BSD license.
Idiorm on GitHub.
The starting point for Idiorm was the topic of my talk at BarCampBrighton last year: &#8220;Minimalism in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://github.com/images/error/octocat_happy.gif"></p>
<p>Just a quick update on a little project I&#8217;ve been working on over the past few months. <a href="http://github.com/j4mie/idiorm">Idiorm</a> is &ldquo;a lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5,&rdquo; and is released under a BSD license.</p>
<p><a href="http://github.com/j4mie/idiorm">Idiorm on GitHub.</a></p>
<p>The starting point for Idiorm was the topic of my talk at BarCampBrighton last year: &ldquo;<a href="http://www.slideshare.net/j4mie/minimalism-in-web-development">Minimalism in Web Development</a>&rdquo;, the idea that for many purposes, simpler solutions are often preferable to complex ones.</p>
<p><span id="more-191"></span></p>
<p>Idiorm lets you start using an ORM in your application with almost no effort. No XML files, model classes, database introspection or code generation is required: You just need to tell the ORM how to connect to your database, and away you go.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Fluent_interface">fluent interface</a> allows you to build most basic queries without writing any SQL, and gets out of the way when you need to do something more complex (both raw WHERE clauses and complete raw queries are supported). Once you have one or more instances of the ORM class (representing the rows in your database tables) you can access the data in them directly as properties of the objects (using PHP&#8217;s magic __get and __set methods internally), modify and save them, as well as delete them. For full documentation and lots of code samples, see the <a href="http://github.com/j4mie/idiorm#readme">README file</a>.</p>
<p>Obviously, such a simple project (the whole ORM class is only about 600 lines of code) would probably never be used in a huge, complex PHP application. The main drawback to using a generic ORM class instead of domain-specific model classes is that you can&#8217;t attach your own behaviour to the models. So the (extremely sensible) idea of placing most of your business logic in your models (<a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model">Skinny Controller, Fat Model</a>) isn&#8217;t possible with Idiorm as-is.</p>
<p>I have three answers to this problem. The first is that many applications simply don&#8217;t need any business logic more complex than basic CRUD operations, for which Idiorm is perfect. Secondly, one clear use case for Idiorm is to clean up legacy applications which are littered with raw SQL statements, usually passed directly into some custom-written &ldquo;database abstraction&rdquo; class or set of functions. Here, the application is <em>already</em> a mess, and in the absence of a complete rewrite, integrating Idiorm can only make things better. Finally, there&#8217;s no reason why you couldn&#8217;t build a full model layer as a lightweight wrapper <em>on top</em> of Idiorm. This would probably take the form of a factory object which returns instances of the correct model class, using Idiorm to populate them with data. I have a rough-and-ready implementation of this idea on my laptop which I may release at some point, but it&#8217;s easy enough to build yourself. If you&#8217;re using PHP 5.3 (and so have access to late static binding), you could even code up a pretty nice implementation of the active record pattern around Idiorm.</p>
<p>So to summarise, Idiorm isn&#8217;t really intended to replace something like <a href="http://www.doctrine-project.org/">Doctrine</a> or <a href="http://www.propelorm.org/">Propel</a> (or <a href="http://ar.rubyonrails.org/">ActiveRecord</a>, or <a href="http://docs.djangoproject.com/en/dev/topics/db/">Django&#8217;s ORM</a>, or <a href="http://www.sqlalchemy.org">SQLAlchemy</a>, etc). It&#8217;s designed to be a quick and easy solution to database abstraction in small-to-medium sized applications. And let&#8217;s face it &#8211; most of us are building small-to-medium sized applications. We&#8217;re building bicycles, not space shuttles. If Doctrine is a rocket engine, Idiorm is a <a href="http://en.wikipedia.org/wiki/Bottom_bracket">bottom bracket</a>. But if all you want to do is get to the corner shop, a bicycle is a much quicker way to travel.</p>
<p>Finally, if you think you&#8217;d find Idiorm useful, please let me know. Fork the project, make suggestions using <a href="http://github.com/j4mie/idiorm/issues">GitHub&#8217;s Issues system</a> or just leave a comment on this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2010/06/08/idiorm-a-simple-orm-for-php/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Maps and Parking Tickets</title>
		<link>http://www.j4mie.org/2009/08/23/maps-and-parking-tickets/</link>
		<comments>http://www.j4mie.org/2009/08/23/maps-and-parking-tickets/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 11:49:53 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Design & Programming]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/?p=145</guid>
		<description><![CDATA[
Over the last few months, I&#8217;ve been kicking around a couple of little spare-time projects, and I&#8217;ve finally got round to writing a blog post about them. Both are fairly simple, but each represents a stepping stone in my efforts to bootstrap my brain into understanding the architecture and design of web applications.


First, http://hereit.is, a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2009/08/appscreens.jpg" alt="hereit.is and iwillpayyourparkingticket.com" title="appscreens" width="450" height="379" class="size-full wp-image-146" /></p>
<p>Over the last few months, I&#8217;ve been kicking around a couple of little spare-time projects, and I&#8217;ve finally got round to writing a blog post about them. Both are fairly simple, but each represents a stepping stone in my efforts to bootstrap my brain into understanding the architecture and design of web applications.</p>
<p><span id="more-145"></span></p>
<p><a href="http://hereit.is"><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2009/08/hereitisbanner.png" alt="hereit.is logo" title="hereit.is logo" width="450" height="63" class="size-full wp-image-159" /></a></p>
<p>First, <a href="http://hereit.is">http://hereit.is</a>, a service for creating short urls for geographical locations. The idea is that you use the map on the homepage to find a location, and then create a short url to represent that location (such as <a href="http://hereit.is/brighton">http://hereit.is/brighton</a>). You can then share this url by email, on the phone, on Twitter, etc. When the recipient(s) of the link visits the url, they are shown a simple landing page containing the map, with a link to Google Maps from where they can plan routes, see satellite imagery, and so on.</p>
<p>Despite its simplicity, hereit.is is built using modern web application principles. It has an <a href="http://en.wikipedia.org/wiki/Model–view–controller">MVC architecture</a> and its design is quite closely based on that of <a href="http://www.djangoproject.com/">Django</a>. I decided to implement it in PHP (which I spend all day using at work), partly to prove to myself that it is at least <em>possible</em> to construct well-architected applications with this badly-assembled mess of a language. I now know that if I had used Django itself, the whole project would probably have taken me about half an hour &#8211; but the project itself wasn&#8217;t really the point. The point was to learn how frameworks are put together, and I have definitely succeeded at that.</p>
<p>I also wanted to get my head around <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>, so hereit.is has simple API which you can use to create locations, and retrieve GeoJSON and KML representations of places. See the <a href="http://hereit.is/api.html">API documentation</a> for more information.</p>
<p>For the front-end design, I took advantage nifty CSS3 tricks, such as <a href="http://www.css3.info/preview/rounded-border/"><code>border-radius</code></a> and <a href="http://www.css3.info/preview/box-shadow/"><code>box-shadow</code></a>. The main page of the site uses no images at all in its design, the idea of which appeals to the minimalist in me (of course, the map itself uses images). Even the logo is a Unicode character, inserted into the heading text with the <a href="http://www.w3schools.com/CSS/CSS_pseudo_elements.asp"><code>:before</code> pseudo-element.</a></p>
<p>I was invited to give a talk about hereit.is at <a href="http://www.fivepoundapp.com/">£5 App</a>, the brilliant monthly-ish meeting organised by <a href="http://ianozsvald.com/">Ian Ozsvald</a> and <a href="http://www.psychicorigami.com/">John Montgomery</a>. I gave a fairly high-level overview of how hereit.is works, and the talk should be fairly accessible (I hope) to the less technical types. You can see the talk on Vimeo here: <a href="http://vimeo.com/5664789">http://vimeo.com/5664789</a></p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5664789&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5664789&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/5664789">£5 App #18 &#8211; Jamie on HereIt.Is</a> from <a href="http://vimeo.com/user1893982">Ian Ozsvald</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><a href="http://www.iwillpayyourparkingticket.com"><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2009/08/iwillpay.png" alt="i will pay your parking ticket logo" title="i will pay your parking ticket logo" width="450" height="46" class="size-full wp-image-161" /></a></p>
<p>The second project is <a href="http://www.iwillpayyourparkingticket.com">I Will Pay Your Parking Ticket</a>. This is the brainchild of my friend <a href="http://www.sebleedelisle.com">Seb Lee-Delisle</a>, who <a href="http://www.iwillpayyourparkingticket.com/help/">explains the idea much better himself</a>. </p>
<p>He asked me to help out with the server-side implementation, which we decided to do with <a href="http://www.djangoproject.com">Django</a>. It&#8217;s fairly straightforward for the most part, with one or two interesting details, such as the method we use to select which tweets to show on the homepage (simple randomness turned out to be quite inadequate), and the Twitter search API integration. Fortunately, you can see how it all works for yourself, because we decided to make the whole project open source. You can <a href="http://github.com/j4mie/parkingtickets">follow or fork it at Github</a>.</p>
<p>This experience has completely sold me on the benefits of <a href="http://www.djangoproject.com">Django</a>. At one stage, we more-or-less completely tore the application apart and rebuilt it from scratch in a few hours. There&#8217;s simply no way that would be possible with almost anything else. I&#8217;ve loved <a href="http://python.org/">Python</a> for years, so the ability to work on Web projects with it is fantastic.</p>
<p>Because of Seb&#8217;s rock-star status in the Flash world, and his thousand-plus followers on <a href="https://twitter.com/sebleedelisle">Twitter</a>, I Will Pay Your Parking Ticket has been pretty popular. We already have nearly six thousand votes in the database. Deciding whether or not random strangers deserve your sympathy is a strangely addictive experience, and a good way to waste your lunch hour.</p>
<p>Again, Seb gave a talk about the idea at <a href="http://www.fivepoundapp.com/">£5 App</a>, which you can see below:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6070867&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6070867&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/6070867">£5 App #19 Seb and Jamie with I Will Pay Your Parking Ticket</a> from <a href="http://vimeo.com/user707645">IanProCastsCoUk</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>So, that&#8217;s a quick update on what I&#8217;ve been doing over the past few weeks. I&#8217;m trying to keep myself busy, with regular attendance at <a href="http://www.flashbrighton.org/">FlashBrighton</a> and other events, as well as getting involved with the brand-new <a href="http://www.buildbrighton.com">Brighton Hackerspace, BuildBrighton</a>. I also managed to grab a ticket for <a href="http://www.barcampbrighton.org/">BarCampBrighton 4</a> at the beginning of September. Hmm, I should probably decide what I&#8217;m going to talk about&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2009/08/23/maps-and-parking-tickets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Conway&#8217;s Life in JavaScript</title>
		<link>http://www.j4mie.org/2009/01/27/conways-life-in-javascript/</link>
		<comments>http://www.j4mie.org/2009/01/27/conways-life-in-javascript/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 02:14:32 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Design & Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/?p=141</guid>
		<description><![CDATA[If you have a modern browser, have a go with my Game of Life implementation in JavaScript, using the HTML5 Canvas element: 

(click for the “live” version)

Feel free to leave a comment with your frame rate..
]]></description>
			<content:encoded><![CDATA[<p>If you have a modern browser, have a go with my <a href="http://en.wikipedia.org/wiki/Conway%27s_life">Game of Life</a> implementation in JavaScript, using the HTML5 <a href="http://en.wikipedia.org/wiki/Canvas_element">Canvas</a> element: </p>
<p><a href="http://www.j4mie.org/misc/canvas/"><img src="http://farm4.static.flickr.com/3404/3197824914_a421a587ba.jpg" alt="Game of Life in JavaScript " />
<p>(click for the “live” version)</p>
<p></a></p>
<p>Feel free to leave a comment with your frame rate..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2009/01/27/conways-life-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cahors</title>
		<link>http://www.j4mie.org/2008/11/16/cahors/</link>
		<comments>http://www.j4mie.org/2008/11/16/cahors/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 00:07:41 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Design & Programming]]></category>
		<category><![CDATA[Electronics + Robotics]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/?p=139</guid>
		<description><![CDATA[
A few months ago, I spent some time writing a MIDI sequencer for the Arduino. I finished the sequencer, wrote a couple of songs with it, and then got sucked into MSc thesis mode and had to abandon it. 
Well, I&#8217;ve finally got round to publishing it as an open source project on Google Code, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/cahors/"><img src="http://farm3.static.flickr.com/2140/2476034483_2ed50b8429_m.jpg" alt="Arduino MIDI shield" /></a></p>
<p>A few months ago, I spent some time writing a MIDI sequencer for the Arduino. I finished the sequencer, wrote a couple of songs with it, and then got sucked into MSc thesis mode and had to abandon it. </p>
<p>Well, I&#8217;ve finally got round to publishing it as an open source project on Google Code, so hopefully others will be able to have some fun with it. I&#8217;ve also written some documentation which will hopefully make it a little easier to get started creating music with it. I&#8217;ve named it ‘Cahors,’ which is a word I found in The Deeper Meaning of Liff. See the FAQ page on the Google Code side for a full explanation.</p>
<p><a href="http://code.google.com/p/cahors/">http://code.google.com/p/cahors/</a></p>
<p>You can hear the first full piece I wrote with Cahors on last.fm <a href="http://www.last.fm/music/hot+pink+brain">here</a>, or you can download the MP3 from the Google Code project page. I&#8217;ve not had a chance to go back and write and more music for it recently, but hopefully I&#8217;ll get back into that soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2008/11/16/cahors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marvin the Mini Web Server</title>
		<link>http://www.j4mie.org/2005/05/24/marvin-the-mini-web-server/</link>
		<comments>http://www.j4mie.org/2005/05/24/marvin-the-mini-web-server/#comments</comments>
		<pubDate>Tue, 24 May 2005 12:00:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/wordpress/?p=6</guid>
		<description><![CDATA[I have been getting extremely fed up with MSN Messenger&#8217;s file sending capability recently.  It&#8217;s ridiculously slow.  As a bit of a personal project, I spend some of yesterday and the night before writing some software to get round the problem.  It&#8217;s a tiny (approx 13Kb) HTTP server written in Java, which [...]]]></description>
			<content:encoded><![CDATA[<p>I have been getting extremely fed up with MSN Messenger&#8217;s file sending capability recently.  It&#8217;s ridiculously slow.  As a bit of a personal project, I spend some of yesterday and the night before writing some software to get round the problem.  It&#8217;s a tiny (approx 13Kb) HTTP server written in Java, which can serve one file at a time.  Very simple to use &#8211; you just drag-and-drop the file you want to serve onto the window.  This will copy the web address of the file onto the clipboard.  You can then paste this into your MSN window (or wherever) and the file can be downloaded.</p>
<p>Notes &#8211; if your computer isn&#8217;t directly connected to the Internet (i.e if you&#8217;re behind a router), you need to forward port 1500 to your machine.  I&#8217;ve included the source code in the .jar file, but be warned it&#8217;s horrible to read, as I didn&#8217;t design this at all and just hacked it straight out of my head into Java (yes, yes, I know that&#8217;s no excuse, but hey, it&#8217;s my first project).  Feel free to use any of this source code, as I borrowed a fair bit of it from other places anyway.  No technical support with this, sorry!</p>
<p><a href="http://www.j4mie.org/misc/software/marvin.jar">Download here</a>.  You&#8217;ll need Java 1.5 for this to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2005/05/24/marvin-the-mini-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
