<?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">
	<channel>
		<title>sam.clark.name</title>
		<atom:link href="http://sam.clark.name/rss/" rel="self" type="application/rss+xml" />
		<link>http://sam.clark.name</link>
		<description>The musings of Sam Clark</description>
		<generator>http://chyrp.net/</generator>
		<language>en</language>
		<pubDate>Tue, 11 Aug 2009 22:57:44 +0000</pubDate>
		<docs>http://backend.userland.com/rss2</docs>
		<item>
			<title>Moving to Kohana 3 - Part One</title>
			<link>http://sam.clark.name/2009/08/11/moving-to-kohana3-part-one/</link>
			<description><![CDATA[<p>If you have been following the <a href="http://www.kohanaphp.com">Kohana PHP framework</a> over the last six months, you will most likely noticed that a major development is underway. The next major version of Kohana is upon us and will be <a href="http://v3.kohanaphp.com/">released imminently</a>. Kohana version 3 is a major rewrite of the current core code base, and almost all applications written in any previous version will require some major development work to port to version 3.</p>

<p>This blog post is here to help guide you through some of the major changes, additions and omissions that are in the Kohana PHP version 3 <abbr title="Application Programming Interface">API</a>. As the final API for Kohana PHP has not been completely locked down, this list may change slightly between now and the release date.</p>

<p>This post represents the first in a series outlining the major changes in the Kohana PHP API from version 2.x to 3.</p>

<ol>
	<li>
		<h3><strong>HMVC vs. MVC</strong></h3>
		<p>Kohana 3 introduces a completely new design pattern, Hierarchical-Model-View-Controller. This pattern is similar to the Model-View-Controller pattern of [its] predecessor, with a few minor enhancements. Previous versions of Kohana would use a router to process a request, routing the uri to the correct Controller and Method, including passing any additional parameters. The controller would process the request and echo the response back to the client, all in a very linear fashion.</p>
		<p>In a Hierarchical-Model-View-Controller environment, the original request can spawn multiple other requests within the system, using a new Request class. The power that this provides to the developer is immense, allowing for applications to be structured and designed in a highly modular fashion. Using the HMVC pattern to its full potential will require an understanding of HMVC and I sincerely recommend you <a href="http://en.wikipedia.org/wiki/Presentation-abstraction-control">read up on the design pattern</a>.</p>
		<p>It should be noted that the use of HMVC within Kohana 3 is entirely optional and the traditional MVC pattern will work just as it has done previously.</p>
	</li>

	<li>
		<h3><strong>Bootstrap, configuration and events</strong></h3>
		<p>The application bootstrap file has been liberated from the system folder. The reason for this is that the bootstrap file now configures most of the application core settings, whereas previously these would be set in the core configuration file. Users of the Zend Framework will be familiar with this practice.</p>
		<p>Responsibilities of the bootstrap file include setting up the Kohana environment; defining the default auto loader; setting system settings for caching, character sets, profiling and other system settings; logging and configuration drivers; modules to load; routes; and finally execution of the request.</p>
		<p>Developers are free to add their own code into the bootstrap, modifying the core operation of the system. This provides a very powerful configuration layer to applications, completely opening up the system initialisation process. In addition to the application bootstrap, modules have their own bootstraps as well, enabling modules to re-configure the system to their requirements at run time.</p>
		<p>A fatality of the bootstrap files new functionality is the Event library of old. Events were used to allow hooking of custom code into the system execution, providing developers the ability to change the behaviour of Kohana at run time. Sound familiar? As you will probably realise, the bootstrap file completely does away with this need. Some people have requested that the Event library be re-instated into Kohana 3. There is nothing to prevent the Event library being ported, but its appearance in the core is certainly expired.</p>
	</li>

	<li>
		<h3><strong>Class structure</strong></h3>
		<p>Kohana 3 introduces a revised class structure that ensures that applications ported from 2.x will require some modification. The old <em>libraries</em>, <em>helpers</em> and <em>controllers</em> folders are gone. Replacing them is a new <strong>classes</strong> folder.</p>
		<p>The way the Kohana autoloader loads files has been altered. All classes reside in a new /classes folder within the system, modules or application folder. A new naming convention is used that simplifies the identification and locating of classes. All classes use the underscore (_) separated name structure as previously, but you will notice a difference in the format.</p>
		<p>Now classes are name spaced by their location rather than class type. An example of this is immediately apparent in the controller class names. <em>Welcome_Controller</em> has become <strong>Controller_Welcome</strong> for example. This is because the Welcome controller resides in the classes/controller folder (/application/classes/controller/welcome.php). Kohana core classes are all prefixed with Kohana (/system/classes/kohana/validate.php). Traditional variants reside in the /system/classes/ folder as well, allowing the use of Validate::factory() over Kohana_Validate::factory() &mdash; although Kohana_Validate::factory() is also available. If you take a quick look at the system/classes folder and the name of the classes, the change should become obvious very quickly. Zend Framework users will be instantly familiar with this practice.</p>
		<p>The notion of libraries and helpers has not been abandoned, but the two are now unified. A good example of this is the <em>Validation library (/system/libraries/Validation.php)</em> and valid helper(/system/helpers/valid.php). Replacing them is a new validate class (/system/classes/validate.php) that contains the methods of both, maintaining the static or member status.</p>
		<p>Your controllers now reside within a controller folder (/application/classes/controller) in your application.</p>
	</li>

</ol>

<p>The next instalment will cover a broad look at the <strike><em>core library changes and amendments</em>, <em>localisation</em> and the <em>new request class</em></strike> new <em>Request Class</em> and the <em>Controller Class</em>.</p>]]></description>
			<pubDate>Tue, 11 Aug 2009 22:57:44 +0000</pubDate>
			<guid>http://sam.clark.name/2009/08/11/moving-to-kohana3-part-one/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>MMIX</title>
			<link>http://sam.clark.name/2009/01/17/mmix-predictions/</link>
			<description><![CDATA[<p>I've been quiet for a while and will be for a while longer. January is a problem month as I have to do several tax returns, manage several birthdays and associated parties as well as dealing with a host of other issues. So all in all I'm pretty busy.</p><p>However, recently I have been reading a lot of 2009 predictions. Predicting what is going to happen over the next 52 weeks is a hard thing to do. Undeterred, pundits still like to 'have a go'. Not being a pundit myself I should instantly give up on trying to predict what is going to happen in 2009. But I'm not going to. So here are my ten predictions for the next 49 weeks (we're in week&nbsp;three now if you hadn't noticed).</p> <ol> <li>I will get married this year.</li><li>Steve Jobs will not step down from his position as Apple CEO, but will probably start making preparations.</li><li>The Independent newspaper will be the first UK broadsheet to&nbsp;disappear, although this may take more than a year to happen.</li><li>Israel will not be&nbsp;prosecuted&nbsp;by the World Court for human rights abuses during the current Gaza conflict, even though they damn well should be.</li><li>Kohana PHP 3.0 will probably not be released. Or if it is, it will be within the last four weeks of the year.</li><li>There will be no relief for the UK economy or housing market this year - sorry guys!</li><li>Labour will continue to slide in public opinion polls with the&nbsp;inevitable&nbsp;result of a Conservative victory in 2010. This saddens me, but serves them jolly right for being non-Labour like.</li><li>Heathrow Terminal 6 and third runway will go ahead despite the fact the government concludes that High-Speed 2 (High Speed Rail line to Birmingham and the North-West) is too expensive and not in the public interest.</li><li>PHP 5.3.0 will finally be released, introducing lambda methods and closures to PHP</li><li>Polaris Digital will not rebrand itself for the first time in three years. But will have a new web site.</li> </ol> <p>&nbsp;So lets all come back in 2010 and see how I did. Happy new year everyone and I hope it is a good one.</p>]]></description>
			<pubDate>Sat, 17 Jan 2009 21:47:16 +0000</pubDate>
			<guid>http://sam.clark.name/2009/01/17/mmix-predictions/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Briefly : Kohana PHP core development</title>
			<link>http://sam.clark.name/2008/12/15/kohanaphp-core-developer/</link>
			<description><![CDATA[<p>I am both excited and honored to announce that I have been accepted into the <a href="http://kohanaphp.com">Kohana PHP</a> core developers team to help maintain and progress the 2.x branch. The next version release will be Kohana PHP 2.3 in the very near future. The current team is being headed up by Jeremy Bush, along with Geert De Deckere, Jim Auldridge, Rocky Wilkins and myself (currently). </p><p>Woody Gilk (Shadowhand) is concentrating on the next major release, Kohana PHP 3.0 that will land sometime in 2009, or as <a href="http://www.eddieizzard.com">Eddie Izzard</a> joked about Microsoft's release schedule:</p><p><cite>&quot;We will release it next week, next month... when it is fucking ready, alright!&quot;</cite></p><p>As yet I have not taken ownership of any tickets (sorry about that), but plan to dent <a href="http://dev.kohanaphp.com">trac</a> during this week.</p><p>For now the main concern is getting a stable build of Kohana PHP 2.3 ready and tested for mass consumption. But after 2.3 there will be maintenance work and maybe a 2.4 release before 3.0 comes long.</p><p>I would like to extend my thanks to Woody for giving me this opportunity. </p>]]></description>
			<pubDate>Mon, 15 Dec 2008 14:02:20 +0000</pubDate>
			<guid>http://sam.clark.name/2008/12/15/kohanaphp-core-developer/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>KDyanamicImage 0.2.3 released on Google Code</title>
			<link>http://sam.clark.name/2008/11/30/dynamicimage0.2.3/</link>
			<description><![CDATA[<p>This week I quietly released an update to the <a href="http://code.google.com/p/kdynamicimage/">DynamicImage</a> library module for <a href="http://kohanaphp.com">Kohana</a>. Version 0.2.3 introduces two key new features. Currently the new version is only available from the repository, because I'm still completing performance testing. A built release will be created shortly.</p><p>DynamicImage <a href="http://code.google.com/p/kdynamicimage/wiki/ChangeLog">0.2.3</a> introduces browser based caching. Previously 0.2.2 introduced server side caching of images, so the process wouldn't have to re-augment an image it had already created. However this did not stop client browsers requesting the same resource repeatedly on page loads and reloads. This introduced some performance issues on a site with many users, as PHP was unnecessarily serving all the images repeatedly.</p><p>Now DynamicImage can send a header to the browser instructing it to cache the image resource for a set number of seconds, defaulting to one day presently. This dramatically reduces the load on the web server.</p><p>The other new feature in DynamicImage 0.2.3 is clean URL support. Previously, to load an image with the library a number of GET variables had to be submitted. This can cause problems with browsers and nodes caching of resources. Now you can supply clean URLs and encode the settings for augmentation within the filename itself. This negates the need for GET variables within the URL.</p><h3>Download</h3><p>To use DynamicImage 0.2.3 you will need to have <a href="http://kohanaphp.com/download">Kohana 2.2.x</a> and the <a href="http://uk2.php.net/gd">GD2 image library and PHP extension</a> installed.</p><p>SVN : svn co <a href="http://kdynamicimage.googlecode.com/svn/trunk/"><strong><em>http</em></strong>://kdynamicimage.googlecode.com/svn/trunk/</a></p><h3>A note on scalability </h3><p>I should add that DynamicImage is a speciallist tool for re-sizing images that require serving at non-specific sizes and ratios. It should not be used as an exclusive method for serving main-stream image resources for your site.</p><p>If the situation arises where there will be numerous calls to the library within your application, you should consider setting up a private <abbr title="Content Delivery Network">CDN</abbr> using KDynamicImage. I recommend running a seperate server using <a href="http://www.lighttpd.net/">Lighttpd</a> with an optimised Kohana/KDynamicImage setup, preferabably with an <a href="http://en.wikipedia.org/wiki/PHP_accelerator">byte-caching</a> solution. This will ensure your application logic is not being slowed by image resource processing and delivery.</p><p>In addition, further performance gains can be made by turning on local browser caching within the configuration </p>]]></description>
			<pubDate>Sun, 30 Nov 2008 14:08:52 +0000</pubDate>
			<guid>http://sam.clark.name/2008/11/30/dynamicimage0.2.3/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>And breathe out...</title>
			<link>http://sam.clark.name/2008/11/05/obamawins/</link>
			<description><![CDATA[<p><img src="http://farm3.static.flickr.com/2383/2287026153_fb67839465_o.jpg" border="0" alt="Barack Obama" width="100%" /><br /><small>Photo credit <a href="http://www.flickr.com/photos/bethcanphoto/">BohPhoto</a>.</small></p><p>Today I woke to the news that Americans had decided overwhelmingly to endorse Barack Obama as their next President of the United States of America. I am desperately trying to keep what this means into some sort of perspective. But however I look at it, it is nothing but good news. For a few moments earlier in the year I feared America would be charmed by the lipstick pit bull embodied by Sarah Palin. Thankfully they were not.</p><p>Nothing will change immediately and things are not going to be easy. But Barack Obama embodies hope and hope is a powerful thing. Delivering his <a href="http://news.bbc.co.uk/1/hi/world/americas/us_elections_2008/7710079.stm">first address</a> as the next president it is clear that the world, not just America, will reap some benefits from this victory. It was less encouraging to hear the booing coming from the Republican supporters when John McCain graciously accepted defeat. But maybe expecting all of America's prejudices to disappear overnight is a little irresponsible.</p><p>The world is partying today just as the galaxy partied at the end of <em>Return of the Jedi</em>. Tomorrow the reality of the situation will begin to creep through the hanging populous. People, there is work to be done. But well done America, some faith has been restored from this side of the Atlantic.</p><p>In completely unrelated news I will be talking much much more regularly in a weeks time. After six months development the next version of Mukuru.com is currently being tested for deployment. Mukuru 2.0.0 Mercury has been built on the excellent Kohana PHP platform and I will be talking a lot more about everything Mukuru and Kohana in the next week or so. So apologies for my absence, but it's been a busy month. </p>]]></description>
			<pubDate>Wed, 05 Nov 2008 10:03:45 +0000</pubDate>
			<guid>http://sam.clark.name/2008/11/05/obamawins/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>@media ajax 2008 roundup</title>
			<link>http://sam.clark.name/2008/09/25/atmedia-ajax-2008/</link>
			<description><![CDATA[<p>It has been over a week since @media ajax 2008 concluded. This years event was certainly smaller and more 'home-brew' than the previous one in November 2007, but I strangely felt this one was more important. A lot of what was talked about last year seemed to be best practice with what we knew about ajax. In the ten months since @media ajax 2007, there has been some fundamental shifts in development for the web.</p><p>Unfortunately I missed Brendan Eich giving his Keynote speech, but was informed by other conference members that he is very enthusiastic about the future of Javascript. Brendan Eich created Javascript for Netscape and must be so proud / excited to see his creation growing and developing faster than any other web language around today.</p><p>I think the two days talks can be split in to two-and-a-half categories; discussions of Javascript libraries; discussions on where Javascript is going; and <a href="http://wait-till-i.com/">Christian Heilman</a> making Javascript accessible (he gets the half category - sorry Christian!). I was meant to attend the follow up to Christian's talk, the Scripting Enabled event last weekend, but unfortunately work and illness struck me down. Needless to say I am feeling quite upset about missing that.</p><p>Javascript libraries were covered extensively across the two days. Prototype, jQuery, Low Pro (Dan Webb's personal library) and the new library from the BBC called Glow where all discussed, but I think everyone was in agreement that Jake Archibald was the rising star.</p><p>Jake was one of a few Javascript developers at the BBC tasked finding a Javascript library that met all of the BBC's stringent accessibility and usability guidelines. After looking at them all, none quite fitted the mix - jQuery came close, but lack of Safari 1 support lost it. So, the BBC decided to develop their own library called Glow. If you have used the BBC iPlayer or BBC Homepage recently then you have been exposed to Glow.</p><p>Jake talked about what problems any developer building their own Javascript library faces and importantly how they were overcome. It was interesting to see some of the bugs from browser vendors other than Microsoft being highlighted for once. Then the ten-million dollar question came... 'I can haz?' from Stuart Langridge. The answer unfortunately was 'no, for the time being'. Jake explained that to develop a library for internal use was one thing, but to let millions of potential developers loose on the code was another. Currently his team does not have the man power to handle hundreds, let alone thousands of support requests from people outside the BBC. BUT, the BBC are now considering releasing it to the world, so watch this space.</p><p>Dan Webb produced a wonderful talk on creating scalable ajax applications by using manageable, reusable code. I was particularly impressed by his use of classes and states to define behaviour. I am used to doing this in the PHP world so it was refreshing to see this done in Javascript. Yehuda Katz also provided an excellent example of almost the same thing, but using jQuery. I will certainly be implementing this technique within my applications going forward.</p><p>Emerging technology topics were mainly covered by Dion Almaer from Google who as ever was demonstrating Google Gears and what it can do for web applications. I have always kind of dismissed Google Gears in the past, but I really can see the benefit of what it is about now. It is providing a bridge for web development allowing us to access features of HTML5 before they are standard in all browsers. In particular Google Gears provides features like local storage (SQLite), Javascript threaded worker pools for high-speed independent javascript processing, Geolocation and many other utilities. I am certainly taking a closer look at Google Gears, not just so I can read my Google Reader articles off-line.</p><p>Joe Walker demonstrated another emerging technology, Comet. Comet is a name for persistently connected web applications. You may be thinking this is old news, but even the most modern web apps are mostly state based, all those ajax calls start and end. Comet provides an open socket between the server and the client, which in turn allows data to continually to be pushed and pulled from either end. HTML5 has a standard called WebSockets for this, but Joe provided some other examples of how this can be done today with Ajax. This was of particular interest to me as I am currently building a Call Centre sales system that would benefit from this technology immensely.</p><p>The closing talk was by Simon Willison who scared the room with When Ajax Attacks! This session was highlighting the fact that providing access to your web application via ajax or any other technology was potentially disastrous. Ajax has the power to do all sorts of naughty stuff, commonly Cross-Site-Scripting (XSS) attacks, where malicious code is placed into your system that then runs in your visitors browsers, stealing cookies and any other information it can. Simon also demonstrated some clever Cross-Site-Request-Forgery (CSRF) attacks. CSRF attacks are more dangerous as they appear to be from trusted sources, but don't fear there is a solution to both. The token, crumb, user key or whatever you want to call it is a safety net. I will be talking about this further with relation to Kohana in the near future.</p><p>After Simon's talk, everyone retreated to the pub and I had a nice long discussion with Dan Webb about working, living and having babies - congratulations again Dan. Sadly that was the last @media ajax for a while as Patrick was openly stating he now wanted to concentrate on @media 2009, after his holiday of course. Next year he has a lot of competition, with FOWD, FOWA and UX from Clearleft all competing for the London conference spotlight. </p>]]></description>
			<pubDate>Thu, 25 Sep 2008 11:47:00 +0000</pubDate>
			<guid>http://sam.clark.name/2008/09/25/atmedia-ajax-2008/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Briefly : @media ajax 2008</title>
			<link>http://sam.clark.name/2008/09/15/briefly-media-ajax-2008/</link>
			<description><![CDATA[<p>Today <a href="http://www.vivabit.com/atmediaAjax/">@media ajax</a> commences. This year the two day conference is smaller than last year, but the topics are equally as important. In 2007 it felt as though the conference was heralding the end of discussing best practice when building web applications - more of a revision of what we have learned over the last few years. Indeed, even some task forces where disbanded as it appeared we [web developers] had practised exactly what countless speakers had preached.</p><p>This leaves little room for this years conference one could think. But of course there is lots going on in the world of rich internet applications and services. Accessible Rich Internet Applications (ARIA) have been talked about previously, including at this years @media in a presentation by <a href="http://www.paciellogroup.com/blog/misc/ARIA/atmedia2008/">Steve Faulkner</a>. But with the recent release of Firefox 3, Safari 4 Dev Preview and Google's Chrome, it seems the age of the web applicaiton has dawned. Eager not to make the same mistakes of past, developers are quickly trying to ensure that accessibility concerns are at the forefront of the web application consideration and execution.</p><p>With all of this in mind, it is clear that this years @media ajax is going to, in part at least, begin to tackle the rather mirky area of accessible rich internet applications - not the standard itself, but how to implement best practice.</p><p>More to follow later this week...</p><p>&nbsp;</p><p>In other news, the world financial systems seem to be collapsing around us all. In an attempt to try and ignore it all I have recently started on the first draft of my Kohana PHP book, presently untitled. The book will provide a solid foundation for new developers migrating or discovering the Kohana PHP framework for the first time. A taster of my efforts will be available shortly in the form of a chapter covering the Object Relational Mapping library, commonly referred to as ORM. </p>]]></description>
			<pubDate>Mon, 15 Sep 2008 13:47:45 +0000</pubDate>
			<guid>http://sam.clark.name/2008/09/15/briefly-media-ajax-2008/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Kohana PHP 2.2</title>
			<link>http://sam.clark.name/2008/08/18/kohana-php-22/</link>
			<description><![CDATA[<p>On August 8th 2008 (or 08.08.08) <a href="http://www.kohanaphp.com">Kohana PHP</a> 2.2 was officially released to the public by the development team. The new version of Kohana builds on the success of 2.1 adding many new features and code improvements. In the same week since the launch of the new version of Kohana, Rob Knight at PRWD wrote a <a href="http://www.paulrouke.co.uk/2008/08/15/php-framework-comparison-kohana/">fair and balanced review</a> of Kohana as part of his series of posts about various PHP frameworks.</p><p>After a week of playing with Kohana 2.2 I am certainly liking a lot of what has been done. Almost all of the changes I have encountered are sensible modifications, omissions or enhancements. For example, the core Config library has now gone, the methods rolled into the core Kohana library instead.</p><p>Previously I have spoke about the ORM library and there will be more on this next week. If you are thinking of porting your Kohana PHP 2.1 application to Kohana PHP 2.2, re-wiring your ORM code will be the largest headache you encounter. Many of the methods previously available have been omitted, such as <em>find_by_email()</em> or <em>find_by_username()</em> for example. You can of course put these functions back if you desire. Why remove such useful methods? Simply speed. Using <em>__call()</em> to handle method calls is far slower than using pre-defined methods. In the quest for an ever faster framework, using code that causes bottle necks is against Kohana's 'fast framework' ethos.</p><p>Relationships within the new ORM library have been redefined as well. This area I personally feel is a vast improvement. Many to many relationships are now equal across both sides of the relationship. Previously one model was the parent and one was effectively the child. Now both models use a <em>has_many()</em> relationship, with a small modification to the pivot table ensuring the relationship is defined in alphabetical order. Related models can now be referenced directly using <em>$parent-&gt;child</em> notation. There is also a new ORM Tree extension to handle tree relations within ORM - this I'm especially happy to see.</p><p>I am intentionally skimming the surface of the new ORM library because I am currently writing a new version of my ORM guide. The new version will be ready very soon and will go into far more detail about this robust library.</p><p>So far it may seem like there is more missing from Kohana 2.2 than gained. Although this is not entirely a bad thing, it isn't true. There are many new modules providing ever more helpers. One excellent one in particular is the Google Maps module that is now pre-bundled if you wish.</p><p>There are many many more changes and you can find out much more on the <a href="http://learn.kohanaphp.com">Learn Kohana</a> blog. Look out for the ORM guide version 2 that will be available here in the near future.&nbsp;</p>]]></description>
			<pubDate>Mon, 18 Aug 2008 08:30:56 +0000</pubDate>
			<guid>http://sam.clark.name/2008/08/18/kohana-php-22/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Briefly : KDynamicImage 0.2.2 is available</title>
			<link>http://sam.clark.name/2008/08/13/briefly-kdynamicimage-022/</link>
			<description><![CDATA[<p>The next new release of <a href="http://code.google.com/p/kdynamicimage/">KDynamicImage</a> for <a href="http://www.kohanaphp.com">Kohana PHP</a> has been released on the project page over at Google Code. The new version adds two key features much requested by the community, proof if there was any doubt that I am listening.</p><p>Version 0.2.2 now allows you to auto-crop an image to fill the desired width and height. The auto-crop feature will take the best fit from the original to resize it to the new orientation. The crop is done using a crop ratio. The ratio is the width versus the height, so a standard widescreen (16:9) image on a television has a ratio of 1.778 - or the width is 1.778 times the height.</p><p>Secondly, caching is now enabled to take the strain off your web servers CPU's. Caching works by saving the unique settings of each image served, so if the same image is served twice, but at different sizes/settings, then the second will create it's own cache as it isn't the same as the first, even though the source is identical.</p><p>Finally a number of code cleanups have taken place with more to come.</p><p>There will now be a short break from KDynamicImage progress as I go on holiday. The next planned version is version 0.5.0 and I predict that it will land sometime in October. The main new feature is live manual cropping.</p><p>You can download the KDynamicImage module for Kohana PHP from Google Code : <a href="http://code.google.com/p/kdynamicimage/">http://code.google.com/p/kdynamicimage/</a></p>]]></description>
			<pubDate>Wed, 13 Aug 2008 09:35:57 +0000</pubDate>
			<guid>http://sam.clark.name/2008/08/13/briefly-kdynamicimage-022/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>ORM and Kohana 2.2</title>
			<link>http://sam.clark.name/2008/07/29/orm-and-kohana-22/</link>
			<description><![CDATA[<p>In just over a week, a new release of <a href="http://kohanaphp.com">Kohana</a> is going to be unleashed on the world. Kohana 2.2 will be launched and there are some big changes coming. The biggest and best change (in your humble authors opinion) is the new ORM library.</p><p>In the first half of this year I published a rough and ready <a href="/2008/03/31/file.8/">guide to the Object Relational Mapping</a> for Kohana, which gave a quick and dirty introduction to the concepts used in Kohana 2.1 and the ORM library. After a couple of weeks playing with the new ORM library I am about to start re-writing the ORM guide for the new library. This is of course when I actually get some time to myself. <em>ed. Not likely gov'</em></p><p>Some of the issues I will cover within the new ORM library are the new relationships setups; overloading models; and built in validation using the Validation library. The last item is an area I have been particularly interested in as it seperates the model from the view finally, unlike using Validation within the Forge module. Forge unfortunately breaks the Model-View-Controller methodology. </p><p>I aim to release version 2.0 of the Kohana PHP ORM Guide shortly after Kohana PHP 2.2 is released in the next two weeks. </p>]]></description>
			<pubDate>Tue, 29 Jul 2008 15:35:59 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/29/orm-and-kohana-22/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Release: Column Navigation 1.1.0</title>
			<link>http://sam.clark.name/2008/07/18/column-navigation-1.1/</link>
			<description><![CDATA[<img src="/assets/images/column-navigation.jpg" alt="Column Navigation stylised graphic" />
<p>Hot on the heels of version 1.0.1 yesterday, Column Navigation version 1.1.0 was released. This followed Shadowhand's comments about the incorrect markup (thanks Woody), taken into consideration I felt compelled to rectify the situation and thus the next release rolled out. To be honest I was never happy with the current state of things myself.</p><p>So whats new in 1.1.0?</p> <ul> <li> Support for both OL and UL list structures with type checking</li><li>Type checking of the callbackFunction parameter for dblclick event</li><li>Automatic DIV element insertion for all containers</li> </ul><p>The biggest news is the automatic DIV element insertion as this was the issue that annoyed both Shadowhand and myself so much. In version 1.1.0 the outer container is automatically added, so you no longer require a containing DIV element, plus all the internal DIV elements are added as needed, so no need for strange badly structured (and broken) markup. Who ever said I didn't listen to the community!?!</p><p>You can download the new version from <a href="http://plugins.jquery.com/project/column-navigation">jQuery plugins</a> or <a href="http://code.google.com/p/jquery-column-navigation/">Google Code</a>.</p><p>The version 1.2.0 is coming, the biggest feature enhancement is callbackFunction facility for the click event as well as the dblclick event. </p>]]></description>
			<pubDate>Fri, 18 Jul 2008 11:16:32 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/18/column-navigation-1.1/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Release: Column Navigation 1.0.1 for jQuery</title>
			<link>http://sam.clark.name/2008/07/17/column-navigation/</link>
			<description><![CDATA[<p><img src="/assets/images/column-navigation.jpg" border="0" alt="Stylised rendering of the column navigation system" /></p><p>Yesterday, I <a href="/2008/07/16/column-finder/">posted</a> a proof of concept video showing the Column Finder (as it was then) in action. The video was a recording of a simple jQuery script that was not portable, customisable or generally usable by anyone other than myself. The intention was always to turn that script into a plug-in for jQuery so everyone could use it and more importantly customise it. The good news is that this is now the case.</p><p>The rationale for creating this plugin is based with trying to structure data hierarchy in an intiutive way, whilst ensuring usability and accessibility concerns are not overlooked. One particular problem I wanted to resolve was displaying pages and their relationships in an intuitive way in a Content Management System. However, the column navigation plugin can be applied to just about any data structure with hierachy.</p><p>So there were some key requirements to meet; accessibility; usability; and intuitive. To meet all the guidelines, the plug-in needed to work progressively, allowing the data structure to exist with or without the enhancement. HTML already has a very good way of structuring data using either the ordered or unordered list elements. This provided my fallback for users without javascript.</p><p>I have found that the Finder in Mac OS X and NeXTStep before it is the most intuitive way of browsing a tree structure. So I not ashamed to say that it as Apple (or indeed NeXT) that inspired this plug-in. In a nut shell, Column Navigation takes an unordered list and adds some magic to create the navigation system. I will leave the detail for those that are interested, they'll go through the source.</p><p>To use the plug-in you need to have a few things first. Firstly it requires <a href="http://jquery.com/download">jQuery</a> to be loaded and secondly it requires the <a href="http://plugins.jquery.com/project/ScrollTo">ScrollTo</a> plug-in, which is also available from the jQuery plug-ins site. Once you have those loaded, you need to mark up your data in an unordered list.</p> <pre> 
	&lt;div id=&quot;myTree&quot;&gt;<br />
		&lt;ul&gt;<br />
		&lt;div&gt;<br />
			&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Homepage&lt;/a&gt;<br />
			&lt;ul&gt;<br />
				&lt;div&gt;<br />
					&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Contact&lt;/a&gt;<br />
					&lt;ul&gt;<br />
						&lt;div&gt;<br />
							&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Telephone&lt;/a&gt;																									<br />
							&lt;ul&gt;<br />
								&lt;div&gt;<br />
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Work&lt;/a&gt;&lt;/li&gt;<br />																							
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Mobile&lt;/a&gt;&lt;/li&gt;<br />																									
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Home&lt;/a&gt;<br />
									&lt;ul&gt;<br />
										&lt;div&gt;<br />
											&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Line 1&lt;/a&gt;&lt;/li&gt;<br />
											&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Line 2&lt;/a&gt;&lt;/li&gt;<br />
										&lt;/div&gt;<br />
									&lt;/ul&gt;<br />
									&lt;/li&gt;<br />																								
									&lt;li&gt;&lt;a class=&quot;document&quot;<br /> href=&quot;http://sam.clark.name&quot;&gt;Fax&lt;/a&gt;&lt;/li&gt;<br />
								&lt;/div&gt;<br />																		
							&lt;/ul&gt;<br />
							&lt;/li&gt;<br />
						&lt;/div&gt;<br />
					&lt;/ul&gt;<br />
					&lt;/li&gt;<br />
					&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;About&lt;/a&gt;<br />
					&lt;ul&gt;<br />
						&lt;div&gt;<br />
							&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Information&lt;/a&gt;<br />																					
							&lt;ul&gt;<br />
								&lt;div&gt;<br />
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;How I started&lt;/a&gt;&lt;/li&gt;<br />																					
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;What happened next&lt;/a&gt;&lt;/li&gt;<br />		
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;The conclusion&lt;/a&gt;&lt;/li&gt;<br />
									&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Epilogue&lt;/a&gt;&lt;/li&gt;<br />
								&lt;/div&gt;<br />
							&lt;/ul&gt;<br />
							&lt;/li&gt;<br />
						&lt;/div&gt;<br />
					&lt;/ul&gt;<br />
				&lt;/li&gt;<br />														
			&lt;/div&gt;<br />
			&lt;/ul&gt;<br />
		&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;What we do&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Our portfolio&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Search&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Documents&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Music&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Videos&lt;/a&gt;&lt;/li&gt;<br />
		&lt;li&gt;&lt;a class=&quot;document&quot; href=&quot;http://sam.clark.name&quot;&gt;Shop&lt;/a&gt;&lt;/li&gt;<br />
		&lt;/div&gt;<br />
		&lt;/ul&gt;<br />
	&lt;/div&gt;<br />
</pre>
<p><strong>NB: Shadowhand has correctly pointed out that this markup is invalid. This is a problem at the moment, but will be addressed in version 1.1 when the additional DIV elements will not be required. Thanks for the heads up though Shadow.</strong></p>
<p>Notice that there are additional DIV elements encapsulating the LI elements in each list. These are required currently to ensure vertical scrolling works correctly for each column. The next version will add these automatically.</p><p>To initiate the column navigation system, your script should use the document.onready() event. As you have jQuery available the best way of doing this is as follows.</p><pre>$(document).ready( function() {<br />			$(&quot;#myTree&quot;).columnNavigation();	<br />});<br /></pre><p>This will initiate the column navigation plug-in using the most basic settings. There are a lot of configuration settings available to you so you can control almost every aspect of the visual interface. There is also a callback facility available allowing you to re-define what the user double-click event does. With these options available, a developer should easily be able to extend/enhance this plug-in for their own needs.</p><p>For a full list of options and settings, you should look at the Google Code project wiki. </p><p>Live demonstration of the plug is available at <a href="http://source.polaris-digital.com/column-navigation/">http://source.polaris-digital.com/column-navigation/</a><br />The project page on jQuery is at <a href="http://plugins.jquery.com/project/column-navigation">http://plugins.jquery.com/project/column-navigation</a> ( please rate it, even if you hate it! )<br />The development project is online at Google Code <a href="http://code.google.com/p/jquery-column-navigation/">http://code.google.com/p/jquery-column-navigation/</a></p>]]></description>
			<pubDate>Thu, 17 Jul 2008 13:26:12 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/17/column-navigation/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Progressively enhanced column view navigation system</title>
			<link>http://sam.clark.name/2008/07/16/column-finder/</link>
			<description><![CDATA[<p><object width="460" height="226">	<param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" />	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1350594&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ffffff&amp;fullscreen=1" />	<embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1350594&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="460" height="226"></embed></object><br /><a href="http://www.vimeo.com/1350594?pg=embed&sec=1350594">Demonstration of Column Finder in Firefox</a> from <a href="http://www.vimeo.com/user608376?pg=embed&sec=1350594">Sam Clark</a> on <a href="http://vimeo.com?pg=embed&sec=1350594">Vimeo</a>.</p><p>One of the many problems with web interfaces is letting the user manage and manipulate large relational data sets, such as page structures within a content management system. You may have seen some of my previous efforts displayed on this blog a few months back for JISC Casper.</p><p>The biggest problem I have found is showing exactly how each page relates to it's neighbours, particularly children to their parents.</p><p>But this problem has been solved already with much success on the desktop. Mac OS X's column view in the Finder is one of the best ways of navigating a file structure. Each level details a list of files and folders, and each folder generates a new level to the right.</p><p>I assumed that re-creating this interface within the browser would be difficult to achieve. I was wrong. Initially I considered drawing each box just in time, using an Ajax query to load the next level. However, even on the fastest of servers there would be time delay as the next level loaded.</p><p>After some experimentation, I took a different approach and drew all the levels simultaneously on the page at load. Then jQuery hides all levels apart from the top level pages and formats the sections correctly.</p><p>It is hard to believe, but underneath this column system is just a simple Unordered HTML list. The beauty of this is that if the user does not have Javascript available, the full file structure will still be completely accessible to the client, ensuring progressive enhancement. </p><p>The full plug-in for jQuery will be released shortly with full instructions and demonstrations... but for now, watch the film of it in action.</p>]]></description>
			<pubDate>Wed, 16 Jul 2008 12:34:31 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/16/column-finder/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>UCDcommerce launched by PRWD</title>
			<link>http://sam.clark.name/2008/07/11/ucdcommerce-launches/</link>
			<description><![CDATA[<p><img src="http://www.ucdcommerce.com/assets/images/ucdcommerce-logo.gif" width="100%" border="0" alt="UCDcommerce logo" /></p><p><a href="http://www.prwd.co.uk">PRWD</a> has just officially announced <a href="http://www.ucdcommerce.com"><abbr title="User Centred Design">UCD</abbr>commerce</a>, &quot;a <span>user centered</span> e-commerce platform&quot; that followers of this blog may realise I had a little to do with towards the end of last year. I am glad that the project is growing quickly in the very capable technical hands of Rob Knight and finally has a real identity of its own.</p><p>UCDcommerce revolves around User Centred Design (hence the name), embodying the ethos that &quot;happy users spend more&quot;, a bold message considering that the UK is officially entering a recession and sales are going to be faught over with greater ferocity in the months to come. A lot of what UCDcommerce offers certainly maintains the User Centred Design philosphy. Key features of UCDcommerce include a powerful searching tool, product finder based on the shoppers situation and tag based navigation. On their own, all of these features are nothing special, but within the e-commerce medium most have not been considered or implemented yet by larger stores.</p><p>However, I feel that UCDcommerce must be more bold going forward. Whilst developing the base framework, PRWD and I were constantly looking at <a href="http://www.amazon.co.uk">Amazon.co.uk</a> and similar high-profile shopping sites for inspiration. But I feel this may have been a mistake as I increasling feel that Amazon.co.uk and it's sister sites are far from the ideal user experience. In fact I am increasingly finding it an irretatiing experience - even with their recent re-design. Amazon's business mainly survives in todays world due to the sheer volume of their catalogue.</p><p>To help explain, I am going to quickly examine three popular UK retail sites. It's a wet Friday night and I want to watch a film. Being the technology savvy person I am, I want to purchase a Blu-Ray disk to watch on my next generation disk player. So I wander down my virtual highstreet to look at the weekly Blu-Ray charts and come across Amazon, clearly the king of e-retail in multimedia; <a href="http://www.play.com">Play.com</a>, the underdog that is rising fast due to amazing prices; and <a href="http://www.hmv.com">HMV.com</a>, a grandaddy from the real highstreet that is making new waves on the web. </p> <p><img src="/assets/images/amazon-blu-ray.jpg" border="0" alt="Amazon.co.uk Blu Ray chart" width="100%" /></p><p>Amazon have recently re-designed their interface, although apart from a slightly different navigation bar I would argue their design remains largely unchanged. As with their previous design, Amazon place far more emphisis on the product itself rather than the information. In particular, look at the size of the blu-ray covers compared to the relative size of the titles and related information. It is almost as though Amazon assume you know exactly what you're looking for and what don't need any of the other information. To me this feels like Amazon shouting 'LOOK, LOOK, BUY, BUY' for each and every item. This approach may entice some, but I personally switch off. On to Play.com.</p><p><img src="/assets/images/play-blu-ray.jpg" border="0" alt="Play.com Blu Ray chart" width="100%" /></p><p>Play.com have obviously looked at Amazon and decided they want to do the same, but a little neater and more balanced. Or as many a client has said to me, &quot;like that but better!&quot;</p><p>It can certainly be argued that Play's chart is clearly considerably a more balanced affair. The box covers do not overwhealm the copy, the title and finally, the very important price information clearly accessible. The Play.com list only shows items you can buy unlike Amazon. Shoppers are a fickle bunch who are not really using their whole brain. Giving them to option to buy now and receive much later does not bode well with me, so I am glad that Play.com are only showing items available today. But wait... What is this bright bold shop next door?</p><p><img src="/assets/images/hmv-blu-ray.jpg" border="0" alt="HMV Blu Ray chart" width="100%" /></p><p>HMV have decided to put emphesis on very different characteristics when compared to the previous two stores. The most striking feature of this chart is the fact that the chart position is so very prominent. It may seem obvious, but this is a 'chart' is it not? Immediately next to the chart position is the movement since the previous week, yet another useful feature for a chart. Only then does the product image appear in balanced proportion, with the user rating clearly shown beneth. The titles are bold and the format and price clearly stand out above the rest of the copy. If I was to criticise this page, I could only argue that the header was too large and too crowded. HMV as an experience wins hands down due to ease of navigation and most importantly, clarity of the chart information and being the fickle chart influenced shopper that I am, walk away with one Batman Begins Blu-Ray from HMV.</p><p>Given this demonstration, I feel Amazon is clearly the third-class citizen with regards to User Experience and Design when compared to it's immediate competitors. So I would also hope that UCDcommerce move away from the halo of Amazon and begin to innovate.</p><p>But it would be unfair to forget myself in this equasion and in the true spirit of not being a complete hyprocrite. Remember I was one of the core developers behind UCDcommerce, so I must turn the spotlight onto myself in earnest.</p><p>In a less than a month the new web site for Mukuru.com will launch with enormous fanfare. The new Mukuru.com e-commerce web site is built on the Fortnum 2.0 framework, which in turn is built on the Kohana PHP framework. The design has been user tested and the checkout process prototyped to hell - so the theory is it should be much easier to use than the current site. Only time will tell. </p><p>Fortnum 2.0 has been completely re-written from the ground up and retains not one line of code that exists in UCDcommerce as it was when I left the project. Currently user testing using Silverback is taking place, which means we are dangerously close to release and until that time I cannot say anything else. But I am very confident that Mukuru.com will blow the competition out of the water and hopefully, just hopefully, set some new standards in User Centred Design within e-commerce.</p><p>It will be fun to watch the respective developments of both Fortnum and UCDcommerce.</p>]]></description>
			<pubDate>Fri, 11 Jul 2008 22:39:51 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/11/ucdcommerce-launches/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>37signals drop support for IE6</title>
			<link>http://sam.clark.name/2008/07/04/out-with-the-old/</link>
			<description><![CDATA[<p>It seems like great minds think alike, as today <a href=" http://37signals.blogs.com/products/2008/07/basecamp-phasin.html">37signals have announced</a> that on August 15th 2008, they will drop support for Internet Explorer 6. Interesting the date they chose as well, as this is my birthday - what a lovely present. </p><p>No doubt this announcement is going to cause a storm on the web with all sorts of discussions ranging from 'what a mistake 37signals are making' through to 'hallelujah!' - I'm in the latter camp by the way. I announced quietly on Twitter in April that the new Polaris Digital web site would not support IE6. In fact, users of IE6 visiting the new Polaris Digital web site will be greeted with a friendly message informing them to get a newer browser and stop breaking the web!</p><p>37signals argue that Internet Explorer 6 was launched in 2001 and has since be superseded by Internet Explorer 7. They continue by pointing out that there are a number of great alternatives in the form of <a href="http://www.getfirefox.com">Firefox</a>, <a href="http://www.apple.com/safari">Safari</a> and <a href="http://www.opera.com">Opera</a> available for free. Also Internet Explorer 8 is not too far off now.</p><p>Many will argue that this will hurt corporate environments where IE6 is dominant and enforced in some cases. This is of course true, however if IT departments had their way, users would be using IE6 forever. It may be backwards thinking, but updating users browsers from IE6 to IE7 is not a high priority as it is seen merely as a tool for browsing with - not something most corporate environments want to encourage or enhance. However, from a security perspective, IT departments should take notice. IE6 is insecure, old and dangerous in the wrong hands. </p><p>Tonight I will toast the beginning of the death of Internet Explorer 6. I am sure many other web services will now follow 37signals' example from August. </p>]]></description>
			<pubDate>Fri, 04 Jul 2008 11:41:24 +0000</pubDate>
			<guid>http://sam.clark.name/2008/07/04/out-with-the-old/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>OS X security patch for ARD hole</title>
			<link>http://sam.clark.name/2008/06/23/ard-security-hole/</link>
			<description><![CDATA[<p>On Friday, <a href="http://blogs.guardian.co.uk/technology/2008/06/20/serious_security_hole_found_in_mac_os_x_tiger_and_leopard.html">Charles Arthur from the Guardian</a> posted a blog post about a serious security threat to the Mac OS X operating system. Apple Remote Desktop (ARA) is the culprit and unfortunately is pre-installed in all versions of Mac OS X Tiger and Leopard.</p><p>If you open terminal and type</p><p>&nbsp;</p><pre>osascript -e 'tell app &quot;ARDAgent&quot; to do shell script &quot;whoami&quot;'</pre><p>&nbsp;</p><p>You will most likely see 'root' as the returned user. This is very bad as it means that an Applescript utilising the Apple Remote Desktop agent can run commands as root, or the Super User. You don't have to be a rocket scientist to understand the remifications of this - if you don't know, you don't want to.</p><p>So far Apple have yet to offer a patch to fix this blatent hole, but luckily the community has been quick to respond. I take no credit for this patch but I'm offering it up as a quick way to fix this hole.</p><p>Back in terminal type the following commands</p><p>&nbsp;</p><pre>cd /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/</pre><pre>sudo chmod u-s ARDAgent</pre><p>&nbsp;</p><p>The sudo command will ask you for your system password. What this command is doing is changing the ownership of the ARDAgent application from root to your own user, which is far more secure. If you rerun the osascript command detailed above, you should now see your own username returned rather than root. </p>]]></description>
			<pubDate>Mon, 23 Jun 2008 10:04:57 +0000</pubDate>
			<guid>http://sam.clark.name/2008/06/23/ard-security-hole/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Briefly : KDynamicImage 0.2.2, Kohana goes international and new blog</title>
			<link>http://sam.clark.name/2008/06/15/briefly-kdymanicimage-022/</link>
			<description><![CDATA[<p>There has been a lot of things happening over the last two weeks. On Monday Apple announced the new iPhone 3G (my interest is already registered with O2), followed by smaller announcements regarding the next version of Mac OS X that we already knew was called Snow Leopard.</p><p>But far more important than that was the release of <a href="http://code.google.com/p/kdynamicimage/">KDynamicImage</a>, originally announced on this blog and since mentioned on <a href="http://learn.kohanaphp.com/2008/06/14/from-the-forums-and-the-web/">Dlib's learn.kohanaphp.com</a> and <a href="http://errant.me.uk/blog/2008/06/traffic/">http://errant.me.uk/blog/2008/06/traffic/</a>&nbsp; - thank you both for the kind words. Okay, so my module for <a href="http://kohanaphp.com">Kohana</a> isn't quite as big a deal as I would like to think it was, but for it to be used by anyone else, let alone be commented on in the bloggersphere is quite touching.</p><p>It would seem prudent to mention then that version 0.2.2 is just around the corner. The next release adds two key features missing from 0.2.1:</p> <ol> <li><strong>DOS attack protection</strong><br />Denial Of Service attack protection allows the developer to cap the upper resolution size of the image render. Currently KDynamicImage will allow you to render an image up to any size, which will hold up any other request to the web server. However you can now configure KDynamicImage to limit the upper resolution.</li><li><strong>Caching</strong><br />Related to the above, caching will store the rendered image and provide the cached version if requested again. Caching is controlled by the config as well, so you can control how regularly the image is re-rendered once cached (if at all). </li></ol> <p>I expect version KDynamicImage 0.2.2 will be released towards the end of next week.</p><p>While I'm on the subject of Kohana, today the Kohana PHP web site was launched in localised versions for German, Spanish, Dutch, French, Polish and Russian. This shows that the popularity of Kohana is growing exponentially and is especially good news for me as I'm endeavouring to write a book on the subject - I may just be able to sell a few copies.</p><p>There will be more on the book in future posts, but one of the chapters planned covers creating a blog system using Kohana. Eagle-eyed viewers will notice that commenting has been firmly turned off on this blog for over a month now. The reason for this is down to Chyrp, the blogging engine. I am not happy with Chyrp's performance, particularly with regards to stopping unwanted spam - even if commenting is turned off.</p><p>So I am writing a simple blogging engine to power this blog for the foreseeable future. Once the new blog engine is live, commenting will be switched back on. If you want to comment or pass on feedback of any kind, please feel free to using either the <a href="/contact/">contact</a> page or the <a href="/socialism/">socialism</a> page.</p><p>The yet to be named blogging engine will also be the basis of the blogging engine detailed in the early chapters of my book. </p>]]></description>
			<pubDate>Sun, 15 Jun 2008 22:11:34 +0000</pubDate>
			<guid>http://sam.clark.name/2008/06/15/briefly-kdymanicimage-022/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>You say tomato, I say tomato</title>
			<link>http://sam.clark.name/2008/06/11/you-say-tomato-i-say-tomato/</link>
			<description><![CDATA[<p><a href="http://sam.clark.name/assets/images/coding.jpg" title="Select to enlarge image"><img src="http://sam.clark.name/assets/images/coding.jpg" border="0" alt="Objective-C and PHP in TextMate" width="100%" /></a></p><p>This is the week that <a href="http://www.apple.com">Apple</a> announced the next generation of their successful <a href="http://www.apple.com/iphone">iPhone</a> platform, both hardware and software. I do not currently own an iPhone, however I do own it's sister product, the <a href="http://www.apple.com/ipod">iPod Touch</a>. However, I am only mentioning the iPhone because of my new venture into <a href="http://en.wikipedia.org/wiki/Objective_C">Objective-C</a>.</p><p>Over the last few months I have been toying with <a href="http://en.wikipedia.org/wiki/Ruby_(programming_language)">Ruby</a> and Objective-C. After some examination of both languages, I have decided to concentrate on Objective-C. The justification for this is two fold.</p><p>Firstly, I get on with Objective-C much better than Ruby. The syntax of Objective-C seems more natural to a seasoned C-like programmer. Ruby's syntax adopts a more natural language structure, which is fine. But I prefer the seperation of spoken language and coding language. Objective-C is based on <a href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a>, or an extension of C. <a href="http://www.php.net">PHP</a> is a C like language built ontop of a C foundation - so the differences are there, but it isn't a mountain to climb for me.</p><p>Secondly Objective-C is the core language of Cocoa, the best programming environment for Mac OS X and iPhone OS X. I have an application in mind for the Mac desktop that should solve a real bug-bear of my web design life. So by learning Objective-C, I am working towards the end goal of developing my first app for Mac OS X. </p><p>Apps for Mac OS X can be developed using Ruby as well, but I would rather use Cocoa's native language rather than an extension.</p><p>So how am I getting on? Over a long Saturday, I built my first calculator app. Nothing fancy and it was limited to command line use, but like with all new frontiers it felt good to see it compile, run and ultimately work as expected. These are baby steps to a new dawn for me. Hopefully in a few weeks time I can tell you of more exciting things I am getting done in Objective-C.</p><p>All of this does not mean I am turning my back on PHP though. At this years @media, PHP got a bit of a kicking from both the Ruby on Rails community and the Django community. <a href="http://www.rachelandrew.co.uk/archives/2008/05/31/does-php-have-an-image-problem/trackback/">Rachael Andrew</a> has already blogged about how she feels about this, but I am going to add my concerns with this perception.</p><p>James Adam started his demonstration of Ruby on Rails by showing a simple for loop in PHP and then the equivilent in Ruby on Rails...</p><p><strong>PHP :</strong> </p><pre>$myarray = array( 'sam', 'clark', 'sian', 'davies' );</pre><pre>for( $i = 0; $i &lt; count( $myarray ); $i++)</pre><pre>{</pre><pre>echo ( &quot;&lt;p&gt;My name is : $myarray[$i]&lt;/p&gt;&quot; );<br />}</pre><p><strong>Ruby : </strong></p><pre><br />myarray = [ 'sam', 'clark', 'sian', 'davies' ]</pre><pre><br />myarray.each { |name| print '&lt;p&gt;' + name + '&lt;/p&gt; }<br />&nbsp;</pre>

<p>The example later demonstrated a lot of PHP mixed up with HTML. The PHP code demonstrated was very poorly written and not in any way comparable with how I write PHP code today. There may have been days in the past worlds of PHP 3 and 4 where I may have written code like that, but not today.</p>

<p>James went on to demonstrate how quick it was to create the @media web site in Ruby on Rails using Scaffold and ActiveRecord. All the way through the demonstration I was thinking, "Yeah, but I can do all of this with Kohana!"</p>

<p>It seems there is a lot of bigotry towards PHP from the new generation languages and frameworks. Sure badly written and conceived PHP is bad and potentially dangerous. But that could be said of all languages.</p>

<p>PHP has come a long ways since its introduction as a simple templating language. PHP 5 is now developing into a powerful Object Orientated language when used correctly. The problem is a lot of the old school are not learning OOP practices. But just because developers are letting the side down, does not mean the platform is lacking.</p>

<p>So please, enough with the PHP bashing. PHP is just as powerful as Ruby or Pyphon and no more or less secure. All of those issues are down to the developer.</p>]]></description>
			<pubDate>Wed, 11 Jun 2008 09:57:38 +0000</pubDate>
			<guid>http://sam.clark.name/2008/06/11/you-say-tomato-i-say-tomato/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>Briefly : KDynamicImage module released for Kohana PHP</title>
			<link>http://sam.clark.name/2008/06/04/kdynamicimage-annoucement/</link>
			<description><![CDATA[<p>Tonight I have released new image manipulation and delivery library for <a href="http://www.kohanaphp.com">Kohana PHP</a>. The module is called <a href="http://code.google.com/p/kdynamicimage/">DynamicImage</a> (or kdynamicimage on Google Code) and contains a the library, a controller and a configuration file. The library has been designed to serve images resolutions and formats independently of the source, without modifying the source material - similar to how images are served from services such as Flickr.</p><p>The library is very simple to use with Kohana PHP. Once installed and activated in your config.php file, you can point your browser at <strong>&lt;yourserver&gt;/dynamicimage/?file=&lt;path&gt;/&lt;filename&gt;</strong> to load your image without any modification.</p><p>Using the built in controller you can add additional arguments to the GET request :</p> <ul> <li><strong>width</strong> output width in pixels (don't add px to value) <em>optional, required if mr='width'</em></li><li><strong>height</strong> output height in pixels (don't add px to value) <em>optional, required if mr='height'</em></li><li><strong>mr</strong> maintain ratio, valid values or 'width' or 'height' <em>optional, requires either a width or height</em></li><li><strong>format</strong> output image format ('gif', 'jpg' or 'png'), defaults to input format <em>optional</em></li><li><strong>maintain_transparency</strong> keep gif/png transparency if set to 'true' defaults to FALSE <em>optional</em></li><li><strong>bk</strong> background colour for transparent images in HEX (without #) defaults to FFFFFF <em>optional</em></li> </ul><p>Although the module is designed to work with Kohana PHP, the library itself could exist independently of Kohana. More details of this will be available on Google Code where you can <a href="http://code.google.com/p/kdynamicimage/">download</a> the latest release or <a href="http://code.google.com/p/kdynamicimage/source/checkout">checkout</a> the latest revisions from SVN.</p>
<p><strong>Update :</strong> I forgot to mention that you will require the GD 2.0 library for PHP to be installed and activated.</p>]]></description>
			<pubDate>Wed, 04 Jun 2008 22:36:47 +0000</pubDate>
			<guid>http://sam.clark.name/2008/06/04/kdynamicimage-annoucement/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
		<item>
			<title>@media 2008 kicks off in sunny London</title>
			<link>http://sam.clark.name/2008/05/29/atmedia-2008-commences/</link>
			<description><![CDATA[<p style="background: black none repeat scroll 0% 0%; text-align: center"><img src="http://www.vivabit.com/atmedia2008/images/lillo2.gif" border="0" alt="at media 2008 logo" /></p> <p>Today marks the opening day of @media 2008 London. I am in attendence, now my second year running, and will be trying to bring you a picture of the two day event from my perspective. As with last year, @media 2008 has two tracks of sessions, making it physically impossible to bring you everything happening - luckily I can see over one hundred laptops open at the moment, so I am sure that between us all we'll have it covered.</p><p>On this blog I will tag everything up with 'atmedia2008' or 'atmedia'. So you should easily be able to reference all the blog postings using that tag. This tag will also be used for all my pictures posted to Flickr.</p><p>I have a certain level of excitement about @media this year, mainly due to the quality of the speakers. Google's Jeffrey Veen kicks things off in about 30 minutes with a talk entitled 'Designing Our Way Through Data', which demonstrates nicely the quality of speakers this year. Patrick has once again superceeded all the expectations of this humble blogger.</p><p>On my must see list this year is Bronwyn Jones, Andy Clarke, John Resig (yes of jQuery fame), Paul Boag and a difficult toss-up between Stuart Langridge and Dan Rubin. As I stated earlier, there are some hard choices to make but, ultimately all the sessions will be released as a podcast in the future.</p><p>So here we go. Two days of pure geekery at London's <a href="http://www.southbankcentre.co.uk/">Southbank Centre</a> marking the middle of <a href="http://www.londonwebweek.co.uk/">London Web Week</a> and in my humble opinion, the highlight. If you're here please shout hello, I'm the guy wearing the 'Low Tech' T-Shirt. </p>]]></description>
			<pubDate>Thu, 29 May 2008 08:45:09 +0000</pubDate>
			<guid>http://sam.clark.name/2008/05/29/atmedia-2008-commences/</guid>
			<dc:creator>Sam Clark</dc:creator>
		</item>
	</channel>
</rss>