<?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>Wirestorm</title>
	<atom:link href="http://wirestorm.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://wirestorm.net/blog</link>
	<description>Ray Hilton&#039;s blog about interesting technology</description>
	<lastBuildDate>Tue, 01 Jun 2010 01:17:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-RC1-15022</generator>
		<item>
		<title>3D &amp; HTML5 Canvas with three.js</title>
		<link>http://wirestorm.net/blog/2010/05/29/3d-html5-canvas-with-three-js/</link>
		<comments>http://wirestorm.net/blog/2010/05/29/3d-html5-canvas-with-three-js/#comments</comments>
		<pubDate>Sat, 29 May 2010 16:46:20 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[three.js]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=59</guid>
		<description><![CDATA[I spent quite a bit of time playing with Processing.org a few years back, mainly using it for video processing (video effects, blob detection, etc) but also for 3D. I recently stumbled across a javascript port of Processing called, logically, Processing.js. This is a really nice idea, taking the established processing syntax (a subset of [...]]]></description>
			<content:encoded><![CDATA[<p>I spent quite a bit of time playing with <a href="http://processing.org/">Processing.org</a> a few years back, mainly using it for video processing (video effects, blob detection, etc) but also for 3D.  I recently stumbled across a javascript port of Processing called, logically, <a href="http://processingjs.org/">Processing.js</a>.  This is a really nice idea, taking the established processing syntax (a subset of Java) and rendering it to a HTML5 Canvas.  The Processing framework uses a &#8220;dont call me, i&#8217;ll call you&#8221; inversion-of-control pattern which makes it very easy to get something up and running but that, and the fact that it is not standard javascript, can make it tricky to integrate.</p>
<p>I also found a very slick library called <a href="http://github.com/mrdoob/three.js">three.js</a> which I used to create the header animation on <a href="http://rayh.com.au">rayh.com.au</a>.  It provides a basic set of 3d concepts such as points, lines, renderer, camera, etc which can use to draw and animate basic 3d scenes.  There is no special loop function, you just use setInterval to trigger your animation to update every once in a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2010/05/29/3d-html5-canvas-with-three-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Super Simple Site using Sinatra</title>
		<link>http://wirestorm.net/blog/2010/05/29/super-simple-site-using-sinatra/</link>
		<comments>http://wirestorm.net/blog/2010/05/29/super-simple-site-using-sinatra/#comments</comments>
		<pubDate>Sat, 29 May 2010 13:50:41 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=54</guid>
		<description><![CDATA[My personal site, rayh.com.au, was in need of dire attention. I had originally made it a flat html/js/css site to show off some jQuery skills. However, even though I really like the idea of a site built entire from static files (damn fast) and using javascript to drive the dynamic elements, it is not search [...]]]></description>
			<content:encoded><![CDATA[<p>My personal site, <a href="http://rayh.com.au">rayh.com.au</a>, was in need of dire attention.  I had originally made it a flat html/js/css site to show off some jQuery skills.  However, even though I really like the idea of a site built entire from static files (damn fast) and using javascript to drive the dynamic elements, it is not search engine friendly.  </p>
<p>Biting the bullet, I decided that I needed some sort of server-side scripting.  By day, I mainly use Java and sometimes Ruby.  So my choices seemed to be Java, Ruby or PHP.  Many moons ago, I was a PHP developer and I bailed out of that technology in favour Java.  For me, PHP just sucks in far too many areas for me to adopt it for a one-off tiny website, but the reasons why is another story.  Java seems way to heavyweight and verbose for my needs and so Ruby seemed like the natural choice.  </p>
<p>Previously I had used Rails for projects, but it&#8217;s full-stack solution was still too much for my needs as my site has no database access.  This led me to look at <a href="http://www.sinatrarb.com/">Sinatra</a>, a super lightweight and declarative approach to a web application.  I simply converted my existing html file to a .erb and told Sinatra:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'sinatra'</span>
&nbsp;
get <span style="color:#996600;">'/'</span> <span style="color:#9966CC; font-weight:bold;">do</span> 
  erb <span style="color:#ff3333; font-weight:bold;">:index</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This code is pretty much all that is needed to get up and running.  It tells Sinatra that when a user accesses the root of the site using GET, serve the index.erb file from the views/ directory.  This approach allowed me to just add the features I needed to perform the simple set of requirements I had rather than trying to convince Rails to do less. </p>
<p>When it came to deploying the app, I used <a href="http://www.modrails.com/">Passenger</a> (AKA mod_rails) with apache which was an absolute breeze.  I highly recommend this approach if you need something more powerful than simple javascript &#038; html without resorting to full-stack web application frameworks or ugly php scripts embedded in html.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2010/05/29/super-simple-site-using-sinatra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Criteria for ActiveRecord</title>
		<link>http://wirestorm.net/blog/2008/04/06/criteria-for-activerecord/</link>
		<comments>http://wirestorm.net/blog/2008/04/06/criteria-for-activerecord/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 08:00:39 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Criteria]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=53</guid>
		<description><![CDATA[Over the last couple of days I&#8217;ve been working on a Criteria for ActiveRecord. The concept is quite simple; rather than writing strings of SQL to pass to the find() method, we build the criteria using an object-orientated approach. Anyone who has used Hibernate, Torque, Propel et al will know how powerful and useful this [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of days I&#8217;ve been working on a Criteria for ActiveRecord.  The concept is quite simple; rather than writing strings of SQL to pass to the find() method, we build the criteria using an object-orientated approach.  Anyone who has used Hibernate, Torque, Propel et al will know how powerful and useful this can be.  </p>
<p>For example, imagine you have a series of filters, all of which may, or may not, add constraints or expressions to your query.  Each filter will need to append it&#8217;s own SQL to the end of any previously generated SQL and may even need to introspect the existing SQL to determine if its doubling up on statements or resolve potential conflicts.</p>
<p>With Criteria this becomes simpler.  For example:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">criteria = Criteria.<span style="color:#9900CC;">new</span>
criteria.<span style="color:#9966CC; font-weight:bold;">and</span> <span style="color:#9966CC; font-weight:bold;">do</span> |c|
  c.<span style="color:#9966CC; font-weight:bold;">or</span> User.<span style="color:#9900CC;">role</span>.<span style="color:#9900CC;">eq</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:admin</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  c.<span style="color:#9966CC; font-weight:bold;">or</span> User.<span style="color:#9900CC;">active</span>.<span style="color:#9900CC;">eq</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  c.<span style="color:#9966CC; font-weight:bold;">or</span> User.<span style="color:#9900CC;">createdAt</span>.<span style="color:#9900CC;">gt</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span>.<span style="color:#9900CC;">hours</span>.<span style="color:#9900CC;">ago</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
criteria.<span style="color:#9966CC; font-weight:bold;">and</span> <span style="color:#9966CC; font-weight:bold;">do</span> |c|
  c.<span style="color:#9966CC; font-weight:bold;">or</span> User.<span style="color:#9900CC;">role</span>.<span style="color:#9900CC;">eq</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:editor</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  c.<span style="color:#9966CC; font-weight:bold;">or</span> User.<span style="color:#9900CC;">active</span>.<span style="color:#9900CC;">eq</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  c.<span style="color:#9966CC; font-weight:bold;">or</span> <span style="color:#9966CC; font-weight:bold;">do</span> |c2|
    c2.<span style="color:#9966CC; font-weight:bold;">and</span> User.<span style="color:#9900CC;">createdAt</span>.<span style="color:#9900CC;">gt</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">20</span>.<span style="color:#9900CC;">days</span>.<span style="color:#9900CC;">ago</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    c2.<span style="color:#9966CC; font-weight:bold;">and</span> User.<span style="color:#9900CC;">createdAt</span>.<span style="color:#9900CC;">lt</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span>.<span style="color:#9900CC;">hours</span>.<span style="color:#9900CC;">ago</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
users = User.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span>, criteria<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>We could, at any point, introspect the state of criteria by calling:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">criteria.<span style="color:#9900CC;">ands</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |c|
  put <span style="color:#996600;">&quot;AND #{c}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
criteria.<span style="color:#9900CC;">ors</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |c|
  put <span style="color:#996600;">&quot;OR #{c}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And, finally, we can remove arbitrary bits of criteria:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">criteria.<span style="color:#9900CC;">ands</span>.<span style="color:#9900CC;">delete_at</span> <span style="color:#006666;">2</span></pre></div></div>

<p>I hope to have a release out very soon, but for the time being some more examples and API docs are  on the <a href="http://criteria.rubyforge.org/">Criteria project page</a> on <a href="http://rubyforge.org">RubyForge</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2008/04/06/criteria-for-activerecord/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Swing Client Properties in JavaFX</title>
		<link>http://wirestorm.net/blog/2007/09/30/setting-swing-client-properties-in-javafx/</link>
		<comments>http://wirestorm.net/blog/2007/09/30/setting-swing-client-properties-in-javafx/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 23:50:17 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=48</guid>
		<description><![CDATA[I have been looking around for a way in which to set Swing client properties easily in JavaFX, without subclassing the whole widget. This seems like the simplest (and most obvious, in hindsight) way of doing this. Documentation is still a bit thin on the ground so I am unsure if this is the proper [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking around for a way in which to set Swing client properties easily in JavaFX, without subclassing the whole widget.  This seems like the simplest (and most obvious, in hindsight) way of doing this.  Documentation is still a bit thin on the ground so I am unsure if this is the proper way to do things:</p>
<p><code><br />
trigger on (new Button) {<br />
	button.putClientProperty("Quaqua.Button.style", "placard");<br />
}<br />
</code></p>
<p>The above code allows me to inform the underlying Quaqua LookAndFeel that I wish to use the placard button style.  If I wanted to use this selectively, I would have to subclass Button.fx, provide an additional attribute (say style) and then apply the property if the attribute is set.</p>
<p>Obviously, you need to know the internal name for the Swing component you are trying to access, <a href="http://langintro.com/jfx/makeapi/api/index.html">this API documentation</a> is pretty helpful for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/09/30/setting-swing-client-properties-in-javafx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse + PHP + J2EE + Rails</title>
		<link>http://wirestorm.net/blog/2007/07/04/eclipse-php-j2ee-rails/</link>
		<comments>http://wirestorm.net/blog/2007/07/04/eclipse-php-j2ee-rails/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 02:33:42 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=47</guid>
		<description><![CDATA[I have just decided to upgrade Eclipse, and thought it best to start from scratch. I do a lot of work in Java, PHP as well as Ruby on Rails and so I tried to set up an integrated environment using Eclipse. I have documented the steps here as much as a reminder for myself [...]]]></description>
			<content:encoded><![CDATA[<p>I have just decided to upgrade Eclipse, and thought it best to start from scratch.  I do a lot of work in Java, PHP as well as Ruby on Rails and so I tried to set up an integrated environment using Eclipse.  I have documented the steps here as much as a reminder for myself as a guide for other people trying to something similar.</p>
<p>First, download and unzip the Ecipse + J2EE package from <a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.  You do not need to &#8216;install&#8217; Eclipse as such, just put the uncompressed directory somewhere logical (/Applications on a Mac, for example).<a href="http://www.eclipse.org/downloads/"><br />
</a></p>
<ol>
<li>Launch Eclipse <img src='http://wirestorm.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </li>
<li>Select: <strong>Help</strong> -> <strong>Software Update</strong> -> <strong>Final and Install</strong>.</li>
<li>Select  <strong>Search for new features to install</strong></li>
<li>Check the <strong>Europa Discovery Service</strong></li>
<li>Select<strong> Add Remote Site</strong></li>
</ol>
<ol>
<li>Type in name:<strong> Aptana </strong>(For javascript support)</li>
<li>Type in url: <strong>http://update.aptana.com/install/3.2/</strong></li>
<li>Select <strong>OK<br />
</strong></li>
</ol>
<li>Select<strong> </strong><strong>Add Remote Site</strong> (For Ruby on Rails support)<strong><br />
</strong></p>
<ol>
<li>Type in name:<strong> RadRails</strong></li>
<li>Type in url:<strong> http://update.aptana.com/install/rails/3.2/</strong></li>
<li>Select<strong> OK</strong></li>
</ol>
</li>
<li>Select<strong> Add Remote Site </strong>(For SVN integration)
<ol>
<li>Type in name: <strong>Subclipse</strong></li>
<li>Type in url:<strong> http://subclipse.tigris.org/update_1.2.x</strong></li>
<li>Select<strong> OK</strong></li>
</ol>
</li>
<li>Select<strong> Add Remote Site</strong> (for PHP support)<strong><br />
</strong></p>
<ol>
<li>Type in name: <strong>PDT</strong></li>
<li>Type in url:<strong> http://download.eclipse.org/tools/pdt/updates/</strong></li>
<li>Select<strong> OK</strong></li>
</ol>
</li>
<li>Select<strong> Add Remove Site </strong>(for Hibernate support)
<ol>
<li>Type in name:<strong> Hibernate Tools</strong></li>
<li>Type in url:<strong> http://download.jboss.org/jbosside/updates/development</strong></li>
<li>Select<strong> OK<br />
</strong></li>
</ol>
</li>
<li>Select <strong>Finish</strong></li>
<li>Select your nearest mirror, when prompted</li>
<li>Select <strong>Eurpoa Discovery Site</strong> -> <strong>Programming Languages</strong> -> <strong>Ruby Development Tools</strong></li>
<li>Select <strong>PDT</strong></li>
<li>Select <strong>Aptana</strong></li>
<li>Select <strong>RadRails</strong></li>
<li>Select <strong>Subclipse</strong></li>
<li>Select<strong> Hibernate Tools<br />
</strong></li>
<li>Select <strong>Select Required</strong> (to resolve dependencies)</li>
<li>Select <strong>Next</strong></li>
<li>Accept the agreement(s) and <strong>select Next</strong></li>
<li>Select <strong>Finish</strong></li>
<li>Go for a walk.</li>
<p>Phew, so after all that, you should have an Eclipse IDE set up to support PHP, Ruby, Rails, Javascript, Java, Hibernate and  Subversion.  You can, of course, select many other tools from the Europa discovery site for other development tools, graphical editing and the like.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/07/04/eclipse-php-j2ee-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windy Road » (Re)Introducing Javascript And Hidden Applets (JAHA)</title>
		<link>http://wirestorm.net/blog/2007/04/26/windy-road-%c2%bb-reintroducing-javascript-and-hidden-applets-jaha/</link>
		<comments>http://wirestorm.net/blog/2007/04/26/windy-road-%c2%bb-reintroducing-javascript-and-hidden-applets-jaha/#comments</comments>
		<pubDate>Thu, 26 Apr 2007 09:41:11 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=46</guid>
		<description><![CDATA[Windy Road has a nice article on the use of Javascript And Hidden Applets, what they call JAHA.  This is similar to the technique I have used in Robonobo, however I am having all sorts of issues on Mactel Firefox, possibly due to the Apple MRJ / Firefox integration. It would be nice to have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://windyroad.org/">Windy Road</a> has a nice article on the use of <a href="http://windyroad.org/?p=23">Javascript And Hidden Applets</a>, what they call JAHA.  This is similar to the technique I have used in Robonobo, however I am having all sorts of issues on Mactel Firefox, possibly due to the Apple MRJ / Firefox integration.</p>
<p>It would be nice to have a small js library that allowed you to dynamically instantiate and destroy embedded, hidden applets.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/04/26/windy-road-%c2%bb-reintroducing-javascript-and-hidden-applets-jaha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Elmo RDF Beans</title>
		<link>http://wirestorm.net/blog/2007/03/28/elmo-rdf-beans/</link>
		<comments>http://wirestorm.net/blog/2007/03/28/elmo-rdf-beans/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 15:30:03 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[RDF]]></category>

		<guid isPermaLink="false">http://wirestorm.net/blog/?p=45</guid>
		<description><![CDATA[&#8220;Elmo is a JavaBean pool implementation for the Sesame RDF repository. Specifically, Elmo is a subject-oriented RDF Bean pool that allows JavaBeans to be cast to different roles and provides a unique context specific view of the subject.&#8221; Basically, you can annotate your classes with url&#8217;s describing the RDF namespace of the class or property. [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Elmo is a JavaBean pool implementation for the Sesame RDF repository. 			Specifically, Elmo is a subject-oriented RDF Bean pool that allows 			JavaBeans to be cast to different roles and provides a unique context 			specific view of the subject.&#8221;</p>
<p>Basically, you can annotate your classes with url&#8217;s describing the RDF namespace of the class or property.  You can then use SPARQL to query/retrieve the beans, and serialize them to/from XML.  Serialization can be acheived through the <a title="Sesame" href="http://www.openrdf.org/doc/sesame2/2.0-beta2/users/">Sesame</a> framework.</p>
<p><a href="http://www.openrdf.org/doc/elmo/1.0/user-guide/">Elmo User Guide</a></p>
<p>Additionally, there is another project, <a title="JRDF" href="http://docs.mulgara.org/system/jrdfapis.html">JRDF</a>, that builds upon Sesame and Jena.  I have yet to use it, but sounds like in encompasses the best of all worlds.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/03/28/elmo-rdf-beans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applets + HTML/Javascript</title>
		<link>http://wirestorm.net/blog/2007/01/31/applets-htmljavascript/</link>
		<comments>http://wirestorm.net/blog/2007/01/31/applets-htmljavascript/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 12:33:00 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://rayh.co.uk/blog/?p=20</guid>
		<description><![CDATA[As part of our, seemingly unending, refactoring of Robonobo, we packaged the whole app into an applet. However, writing a UI in swing felt very un-webby, and would fail to integreate, visually, with the style of the site. We would also like our users to have the ability to be able to customize or rebuild [...]]]></description>
			<content:encoded><![CDATA[<p>As part of our, seemingly unending, refactoring of <a href="http://robonobo.net">Robonobo</a>, we packaged the whole app into an applet.  However, writing a UI in swing felt very un-webby, and would fail to integreate, visually, with the style of the site.  We would also like our users to have the ability to be able to customize or rebuild their own UIs using simple standards.<br />
Luckily, however, applets have some very cool features that I only just learnt about, inlcuding LiveConnect (from whence XPConnect comes from).  This provides a bridge between java and javascript, allowing me to call java functions from javascript and return real java objects to javascript.</p>
<p>Using this, we created an applet with no UI, that sits in a 0&#215;0 pixel container, and a javascript support library which communicates and wraps the functionality provided by robonobo.  All the UI can now be rendered using html, css and javascript, in a very ajaxian fashion.</p>
<p>There are a couple of gotchas though:</p>
<ul>
<li>You cannot return primitive types such as int, float, etc.  Instead you must use the object equivilents Integer, Float, etc.</li>
<li>Calling from javascript comes from an unprivileged thread, so despite your applet&#8217;s policy, it may well be denied permissions.  You can simply wrap such requests on the java-side with an AccessController.doPrivileged()</li>
<li>Large applets can lock up the browser because the JVM and the jar are being loaded concurrently.  This can be aleviated by splitting your applet into a smaller jar containing just the applet and interfaces, and the main jar containing the implementation.  This way, the jvm and applet initialize quickly, and then do not block the browser when the second jar is downloaded.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/01/31/applets-htmljavascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wish: P2P Virtual Office</title>
		<link>http://wirestorm.net/blog/2007/01/05/wish-p2p-virtual-office/</link>
		<comments>http://wirestorm.net/blog/2007/01/05/wish-p2p-virtual-office/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 00:02:35 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://rayh.co.uk/blog/?p=22</guid>
		<description><![CDATA[I work for a couple of companies whose employees are distributed across timezones and countries and someone needs to write a bit of software to make this easier. Something like BoxCloud combined with Subversion. The idea being that all shared files exist on each individual machine and are synchronized when people come online. All previous [...]]]></description>
			<content:encoded><![CDATA[<p>I work for a couple of companies whose employees are distributed across timezones and countries and someone needs to write a bit of software to make this easier.  Something like <a title="BoxCloud" href="http://www.boxcloud.com/">BoxCloud</a> combined with <a title="Subversion" href="http://subversion.tigris.org/">Subversion</a>.  The idea being that all shared files exist on each individual machine and are synchronized when people come online.  All previous versions of the documents are stored as well.  A new file can be shared with everyone just by placing into a special folder on ones computer, which is monitored by the client.</p>
<p>Then, you need a Push-to-talk voip system.  Often you dont need to have a full conversation with someone, but instead let them know what your doing, or that you have just updated a document, etc.  A special key on the keyboard (maybe caps lock?  put it to some good use) will enable you to say a few words to a person or to the whole team.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2007/01/05/wish-p2p-virtual-office/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP&#8217;s Lacking</title>
		<link>http://wirestorm.net/blog/2006/09/27/phps-lacking/</link>
		<comments>http://wirestorm.net/blog/2006/09/27/phps-lacking/#comments</comments>
		<pubDate>Wed, 27 Sep 2006 12:37:09 +0000</pubDate>
		<dc:creator>rayh</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://rayh.co.uk/blog/?p=19</guid>
		<description><![CDATA[I like PHP; its fun, quick and easy&#8230; most of the time. However, I have recently had the misfortune of attempting to make WordPress, Wikka Wiki and Vanilla work together. Although, individually, they are very powerful and superb examples of open source development, they suck at working with other projects. Two things immediately struck me: [...]]]></description>
			<content:encoded><![CDATA[<p>I like PHP; its fun, quick and easy&#8230; most of the time.  However, I have recently had the misfortune of attempting to make WordPress, Wikka Wiki and Vanilla work together.  Although, individually, they are very powerful and superb examples of open source development, they suck at working with other projects.</p>
<p>Two things immediately struck me:  1) lack of a common templating system and 2) lack of a common authentication /authorisation system</p>
<p>Now, I don&#8217;t mean that there should be a single templating system used by all, but there should at least be support for a simple border template system.  Such a system could let me define the basic outline, css, scripts, divs, etc and then nominate extention points, i.e. places in the template other systems can hook into and publish their content.  HTML with some proprietry xml tags embedded could be transformed using XSLT into the project specific template format.  Indeed, drivers could be provided to allow converstion to most popular templating systems.</p>
<p>Templating is a big issue with me, everyone has their own way of doing it. I do not agree with systems like Smarty that try to seperate the user from the structures of php in order to prevent them from embedding control logic in their templates.  Of course, a developer shouldn&#8217;t be doing this, but this is a self-discipline issue, not a need to develop a non-standard scripting language on top of another, perfectly functional, scripting language.</p>
<p>The templating issue was overcome, if in a rather hacked manner, by reducing the templates of each project to the bare minimum, ie, no css, simple div structures, etc.  A proxy-like service would then explode the head and body section and recombine it using a standard template.  This could be seem as object-like inheritance of a standard template dom tree (similar to the concept of XUL overlays).</p>
<p>Although templating is an irritating issue, it is not quite as irritating as the authentication issue.  Here we have three seperate projects, each with their own authentication system, and although some allow the easy application of your own code, quite why the community cannot make efforts to agree on a common authentication API, is beyond me.</p>
<p>PHP needs to be distributed with a set of APIs that cover these common problem areas.  Additionally, if you want to include code from several projects into one, you NEED some form of namespacing standard.  I would love to see some sort of PHP community standards effort that would lay down the law for such things.  Projects built to these specifications would automagically behave well together and allow coders to get on with writing Cool Shit rather than hacking a project&#8217;s ludircrously over-complex templating system.</p>
]]></content:encoded>
			<wfw:commentRss>http://wirestorm.net/blog/2006/09/27/phps-lacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
