<?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>Karl Rixon</title>
	<atom:link href="http://www.karlrixon.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlrixon.co.uk</link>
	<description>Web development, programming and I.T.</description>
	<lastBuildDate>Sat, 21 Apr 2012 10:04:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Gem</title>
		<link>http://www.karlrixon.co.uk/portfolio/gem/</link>
		<comments>http://www.karlrixon.co.uk/portfolio/gem/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 18:20:43 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=306</guid>
		<description><![CDATA[The charity I work for, AVERT, runs one of the most popular HIV/AIDS websites in the world, receiving over 4 million visitors each month. The website features all kinds of content, including educational pages, photos and videos and interactive games and quizzes. Avert also has various other activities to perform such as sending newsletters to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-308" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/collection.jpg" alt="" width="516" height="309" /></p>
<p>The charity I work for, AVERT, runs one of the most popular HIV/AIDS websites in the world, receiving over 4 million visitors each month. The website features all kinds of content, including educational pages, photos and videos and interactive games and quizzes. Avert also has various other activities to perform such as sending newsletters to subscribers and donators, as well as maintaining extensive libraries of HIV/AIDS related media and publications. In addition, the organisation is always keen to have detailed information regarding these activites to hand &#8211; how many people watch a given video, how many people correctly answer a certain question from a quiz and so on.</p>
<p>When I started at Avert, many of these activities were managed by a variety of disparate systems. There was a basic CMS for managing the content on the website, a separate media library program, and a separate publications database. Additionally, many activities either had to be performed manually, or could not be carried out at all, for example managing the questions in online quizzes, sending newsletters and getting detailed statistics about videos.</p>
<p>Whilst initially I worked on developing the existing systems, it soon became clear that addressing all the shortcomings would be best handled by developing a completely new, modular and integrated system, so I set about developing Gem, the name chosen to refer to this new software.</p>
<p>Gem incorporates a great deal of functionality. This is an overview of some of it.</p>
<h2>Access Control List Based Users and Usergroups</h2>
<p>Gem covers a wide variety of tasks, from updating the website to managing donators&#8217; information. For this reason, it is used daily by almost everyone in the organisation, so it is important to be able to have fine-grained control over who can do what.</p>
<p>Gem provides this control by using an Access Control List, in which users and groups are Access Request Objects, and functions within Gem are Access Control Objects. Using this system, any user or group can be granted permission to perform any function in a completely flexible way.</p>
<p>I also incorporated the notion of role-based access control. The primary mechanism for granting permissions to a user is to add them to the appropriate usergroup, which in tern is granted the necessary permissions. This provides a simple and quick way of setting up or modifying existing users. For when the inevitable exceptions need to be made, it is also possible to override permissions inherited from a usergroup on a per-user basis.</p>
<p><img class="aligncenter size-full wp-image-313" title="users" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/users.jpg" alt="" width="532" height="340" /></p>
<h2>Reporting and Statistics</h2>
<p>Avert is very keen on maintaining detailed and accurate statistics concerning its activities. It is always useful to know that a game is being played less than the others, or what the most popular video is.</p>
<p>Gem provides all of this information using clear and simple charts and tables. Sometimes displaying statistics also means developing external tools to provide the raw data, as is the case with the videos features on Avert&#8217;s site. Avert hosts many of its videos on YouTube, which provides basic stats, however due to copyright issues, some videos need to be served from Avert&#8217;s own server. Together with Avert&#8217;s Designer Thomas Michalak, I wrote a video player in ActionScript which  consumes the YouTube API for playing most videos, but also plays from the filesystem, feeding back the same data whichever source is used. This is all completely seamless to the user, with the same player front-end used regardless of source, and Avert gets all of the data it needs.</p>
<p><img class="aligncenter size-full wp-image-307" title="charts" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/charts.jpg" alt="" width="604" height="203" /></p>
<p>Gem utilises Google&#8217;s Charts API to produce the chart images. The hard work is performed by a CakePHP helper I wrote which takes simple arrays as input, and generates attractive and properly formatted charts as output.</p>
<h2>Simple Editing of HTML Content</h2>
<p>As anyone who has developed CMS type software will know, one of the biggest challenges is supporting the creation and modification of standards-compliant HTML by non-technical users. In Gem for example, content writers need to be able to update web pages, whilst the fundraiser needs to be able to compose HTML newsletters. Additionally, technical users such as the Web Designer need to be able to edit code directly.</p>
<p>To this end, Gem supports a variety of Rich Text Editors and Real Time Editors. It is a simple matter for me to add a new editor at any time, and users will be shown the correct editor for their usergroup (or given the choice of editors via their control panel where appropriate). For example, content writers currently use a TinyMCE-based editor, for which I wrote various custom plugins to integrate functionality from various Gem modules such as the media module. Developers and Designers get a real-time code editor which, although not as complete as a standalone code editor, provides simple functionality such as syntax highlighting and line numbers.</p>
<p>As good as editors such as TinyMCE are, they always have quirks and issues. For this reason, Gem uses a CakePHP Behaviour I wrote which ensures that the content passed back from these editors is clean and well-formed before being saved.</p>
<p><a href="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/rte.jpg"><img class="aligncenter size-full wp-image-312" title="rte" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/rte.jpg" alt="" width="536" height="299" /></a></p>
<p><a href="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/integrated_media.jpg"><img class="aligncenter size-full wp-image-310" title="integrated_media" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/integrated_media.jpg" alt="" width="536" height="311" /></a></p>
<h2>Integration with External Systems</h2>
<p>Gem integrates with various external systems in order to provide some functionality. The Newsletter module is a prime example of this. Avert&#8217;s website allows users to sign up for newsletters, and Gem integrates with this system in order to synchronise the subscribers with its own database. When the fundraiser sends a newsletter, anyone who has subscribed via the website will be included in the distribution automatically.</p>
<p>Speaking of newsletters, Gem is able to send mime-encoded email newsletters to the database of subscribers, all from a simple to use WYSIWYG editor (or real time code editor for technical users). As always, reporting is fundemantal, so it is possible to keep track of the progress of a newsletter mailout in real time.</p>
<p><a href="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/newsletter_progress.jpg"><img class="aligncenter size-full wp-image-311" title="newsletter_progress" src="http://www.karlrixon.co.uk/wp-content/uploads/2012/01/newsletter_progress.jpg" alt="" width="539" height="238" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlrixon.co.uk/portfolio/gem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework JSON-RPC Client Released</title>
		<link>http://www.karlrixon.co.uk/writing/zend-framework-json-rpc-client-released/</link>
		<comments>http://www.karlrixon.co.uk/writing/zend-framework-json-rpc-client-released/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 11:03:34 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.karlrixon.co.uk/?p=256</guid>
		<description><![CDATA[
