<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Paul Feaviour's Blog</title>
	<atom:link href="http://paulfeaviour.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulfeaviour.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 09 Aug 2011 20:48:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='paulfeaviour.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paul Feaviour's Blog</title>
		<link>http://paulfeaviour.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://paulfeaviour.wordpress.com/osd.xml" title="Paul Feaviour&#039;s Blog" />
	<atom:link rel='hub' href='http://paulfeaviour.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Running Websocket example with jetty-mavenplugin</title>
		<link>http://paulfeaviour.wordpress.com/2010/04/01/running-websocket-example-with-jetty-mavenplugin/</link>
		<comments>http://paulfeaviour.wordpress.com/2010/04/01/running-websocket-example-with-jetty-mavenplugin/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 10:02:52 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=257</guid>
		<description><![CDATA[The Websocket protocol, still only a draft standard, is a part of the HTML 5 draft standard.  The protocol is being designed to allow web-based applications to communicate with server side services in an asynchronous manner. Whether Websockets supersede other comparable technologies such as CometD/Bayeux protocol as some have suggested (Joe Armstrong, father of Erlang: WebSockets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=257&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Websocket protocol, still only a <a href="http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-74">draft standard</a>, is a part of the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML 5 draft standard</a>.  The protocol is being designed to allow web-based applications to communicate with server side services in an asynchronous manner.</p>
<p>Whether Websockets supersede other comparable technologies such as <a href="http://cometd.org">CometD</a>/<a href="http://svn.cometd.com/trunk/bayeux/bayeux.html">Bayeux protocol</a> as some have suggested (Joe Armstrong, father of Erlang: <a href="http://armstrongonsoftware.blogspot.com/2009/12/comet-is-dead-long-live-websockets.html">WebSockets will kill Comet</a>)  or do not go far enough (Greg Wilkins, co-creator of <a href="http://jetty.eclipse.org/">Jetty</a> and the Bayeux protocol:  <a href="http://blogs.webtide.com/gregw/entry/how_to_improve_websocket">WebSocket specification needs improving</a>) I would not want to hazard a guess.</p>
<p>It&#8217;s even possible that Websockets end up complimenting CometD in CometD version 2, as discussed <a href="http://blogs.webtide.com/gregw/entry/websocket_chat">here</a> &#8211; but as noted by Greg Wilkins there are still issues left to resolve such as <em>Keep Alives</em> with a suggestion for a future version to support timeout discovery and <em>Timeouts </em>with suggested messages that can be used to distinguish between a network failure and an orderly close as the user leaves the page.</p>
<p>Anyway, considering that Websockets and HTML 5 is being sponsored by Google, Apple and others at the <a href="http://www.whatwg.org/">WhatWG</a> working group and there are already HTML 5 capable browsers (Chrome, Safari) starting to  support the WebSocket protocol, I, in an attempt to better understand the technologies, decided to download Jetty and follow a simple<a href="http://blogs.webtide.com/gregw/entry/websocket_chat"> Websocket Chat</a> example.  After a few minutes I had the simple application up and running using Jetty and the Google Chrome browser.  However, I ran into an issue when trying to run the simple app using the Maven Jetty plugin, getting the following exception:</p>
<pre>java.lang.NullPointerException        at
org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:92)        at
org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:60)        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)        at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)        at
<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;">...</span></pre>
<div>This I resolved by adding the Jetty-websocket library as a dependency to the plugin:</div>
<div>
<pre class="brush: xml;">
&lt;plugin&gt;
	&lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
	&lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
	&lt;version&gt;7.0.2.RC0&lt;/version&gt;
	&lt;configuration&gt;
		&lt;scanIntervalSeconds&gt;5&lt;/scanIntervalSeconds&gt;
	&lt;/configuration&gt;
	&lt;dependencies&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
			&lt;artifactId&gt;jetty-websocket&lt;/artifactId&gt;
			&lt;version&gt;7.0.2.RC0&lt;/version&gt;
		&lt;/dependency&gt;
	&lt;/dependencies&gt;
&lt;/plugin&gt;
</pre>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=257&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2010/04/01/running-websocket-example-with-jetty-mavenplugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>
	</item>
		<item>
		<title>Database versioning</title>
		<link>http://paulfeaviour.wordpress.com/2009/05/02/database-versioning/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/05/02/database-versioning/#comments</comments>
		<pubDate>Sat, 02 May 2009 12:21:03 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=166</guid>
		<description><![CDATA[Databases in any system under development will inevitably require modifications, maintaining these scripts and identifying which scripts need to be applied to databases in various environments (production, staging and development) can be challenging.  These challenges are further compounded if the development of core features is done in multiple branches. Where I am working we are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=166&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Databases in any system under development will inevitably require modifications, maintaining these scripts and identifying which scripts need to be applied to databases in various environments (production, staging and development) can be challenging.  These challenges are further compounded if the development of core features is done in multiple branches.</p>
<p>Where I am working we are currently versioning files with the following naming scheme:</p>
<p>            <em>nnn</em>-a short script description.sql</p>
<p>where &#8220;<em>nnn</em>&#8221; is an incrementing version number.</p>
<p>In each database there is a database_updates table which is a simple record of which scripts have been applied and when (the scripts are expected to update this table &#8211; the actual script and the database_update are all done within a transaction).</p>
<p>It&#8217;s not at all uncommon for scripts to be committed with a particular version number into one working branch only to find when merging back down to the trunk that scripts exist with the same version numbers, despite being very different scripts.  The responsibility for this resides with the person doing the merge, as there is always the file name that can be used to distinguish scripts.  This is a less than perfect solution &#8211; and I for one would like be able to run scripts checked in and not have to worry about exceptions because a script with the same version number has already been applied (unless of course I am running a script that has been run before). Apart from being a little disconcerting there is the very real chance that a script will be ignored with the assumption that the script has already been applied &#8211; locally this isn&#8217;t such an issue but can cause delays in our production and staging environments.</p>
<h3>Suggestions</h3>
<p>Maybe I am making something out of nothing here and by simply using the same merge tools that are used for code; along with a little common sense these issues can be sorted.  Perhaps, but I can&#8217;t help but think there is a &#8220;nicer&#8221; solution. None of the following suggestions make sense unless you have &#8220;baselined&#8221; the database and can recreate from script, a known good staring point.</p>
<p>In no particular order:</p>
<ul>
<li>Separate repository for database scripts &#8211; perhaps using the svn:externals property to map a local directory to the URL-and possibly a particular revision-of the versioned resource: (http://svnbook.red-bean.com/en/1.1/ch07s04.html)</li>
<li>Database scripts that are committed should be treated as immutable &#8211; there is no point of versioning a file and then modifying it &#8211; it may have already been executed and any subsequent changes may not get applied.</li>
<li>File name is just version number so multiple scripts of the same number can not be added without a conflict and seeing as scripts should not be updated an svn merge is out of the question (or a &#8220;resolve with mine&#8221; type of operation). If this seems too restrictive (the file naming) perhaps an svn script can be written to check and reject a file if one with the same version prefix/suffix already exists?</li>
<li>File names are named in such as way you know which version of the database it applies to</li>
</ul>
<h3>In Practice</h3>
<p>Let&#8217;s say the database is baselined and versioned 1.000 and 15 change scripts are added (1.001 to 1.015).  At this point a release branch is created along with a version 2.000 schema script in the trunk  - this script will produce the same database as the original script plus the 15 change scripts.</p>
<p>New scripts added in the trunk are for the version 2 database, so if 4 scripts were added there would be scripts 2.001 to 2.004.  If a script is needed in the release branch &#8211; 1.016, the production system could simply receive this change as production is still running with version 1 &#8211; the problem is how to integrate 1.016 into the trunk.  One solution could be to create a new script in the trunk, 2.005, that has the 1.016 changes.  All version 1 databases can simply run all version 1 change scripts, version 2 databases start with the version 2 baseline script and apply any 2.x change scripts.</p>
<p>This works ok when branches are created for release as schema changes and code modification slow.  Hopefully only bug fixes are committed to the branch and not new features.  Modifications made in the branch are generally merged down to the trunk where work not scheduled for a particular release resumes.</p>
<p>This is all fine and dandy until we come to &#8220;feature&#8221; branches &#8211; this is where I get stuck <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Suggestions most welcome!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=166&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/05/02/database-versioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>
	</item>
		<item>
		<title>Using SketchFlow for Prototypes</title>
		<link>http://paulfeaviour.wordpress.com/2009/04/29/using-sketchflow-for-prototypes/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/04/29/using-sketchflow-for-prototypes/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 13:08:46 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=192</guid>
		<description><![CDATA[Some excellent articles on using SketchFlow to create fun and agile prototypes by Simon Guest on InfoQ and Christian Schormann<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=192&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some excellent articles on using SketchFlow to create fun and agile prototypes by <a href="http://www.infoq.com/articles/guest-simon-sketchflow">Simon Guest on InfoQ</a> and <a href="http://electricbeach.org/?p=145">Christian Schormann</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=192&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/04/29/using-sketchflow-for-prototypes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>
	</item>
		<item>
		<title>Google App Engine and Groovy</title>
		<link>http://paulfeaviour.wordpress.com/2009/04/20/google-app-engine-and-groovy/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/04/20/google-app-engine-and-groovy/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 15:52:52 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Googel App Engine]]></category>
		<category><![CDATA[Groovy/Grails]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=77</guid>
		<description><![CDATA[Getting Groovy working on the Google App Engine required a few tweaks, thankfully the SpringSource Groovy and Google App Engine Java teams stepped up and worked together on various details including the area of constrained and strict security manager policies, to ensure development on the Java platform can take advantage of Groovy as a dynamic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=77&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Getting Groovy working on the Google App Engine required a few tweaks, thankfully the SpringSource Groovy and Google App Engine Java teams stepped up and worked together on various details including the area of constrained and strict security manager policies, to ensure development on the Java platform can take advantage of Groovy as a dynamic language.  An updated <a href="http://docs.codehaus.org/display/GROOVY/2009/04/07/Groovy+1.5.8+and+1.6.1+are+out">Groovy 1.6.1 version</a> is ready and by adding the &#8220;groovy-all&#8221; JAR in your <code>WEB-INF/lib</code> directory you can get start writing your applications in Groovy.</p>
<p>Following on from my previous post on <a href="//paulfeaviour.wordpress.com/wp-admin/post.php?action=edit&amp;post=30”"> Google App Engine</a> I thought I’d have a stab at getting a Groovy application up and running with the App Engine plaform myself!  I followed <a href="http://blog.springsource.com/2009/04/07/write-your-google-app-engine-applications-in-groovy/">Guillaume Laforge’s excellent blog: &#8220;write your Google App Engine applications in Groovy!&#8221;</a>.</p>
<p>After following Guillaume Laforge’s mini tutorial I tried to get the test project working within my Eclipse Google App Engine environment – this wasn’t as straightforward as I would have expected.  I kept getting the following exception when trying to launch the application locally (this appears to be a local environment issue only):<br />
<code>java.security.AccessControlException: access denied</code><br />
<code>    (groovy.security.GroovyCodeSourcePermission /groovy/shell)</code></p>
<p>After a bit of playing around and searching I found I wasn’t the only one with this problem, and a <a href="http://code.google.com/p/googleappengine/issues/detail?id=1219#makechanges">bug</a> has been raised concerning this.</p>
<p>To get the application working locally I needed to add the groovy-all-1.6.1.jar to the libraries in the Java Build Path – although this allowed me to run the application I have been unable to make changes to any Groovy code (that requires a compilation) without a restart – updates to GSPs and Groovlets seem to be fine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=77&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/04/20/google-app-engine-and-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>
	</item>
		<item>
		<title>Improving the feedback loop in Java with JavaRebel</title>
		<link>http://paulfeaviour.wordpress.com/2009/04/17/improving-the-feedback-loop-in-java-with-javarebel/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/04/17/improving-the-feedback-loop-in-java-with-javarebel/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 09:24:25 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaRebel]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=32</guid>
		<description><![CDATA[One of the things that I have come to really appreciate about the .NET platform, coming from a Java background, is the increased productivity you get with such an integrated IDE and the runtime &#8211; no need to archive up artefacts and deploy to a container (in the Java sense that is, I know .NET [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=32&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-100" title="javarebel" src="http://paulfeaviour.files.wordpress.com/2009/04/javarebel.jpg?w=70&#038;h=70" alt="javarebel" width="70" height="70" />One of the things that I have come to really appreciate about the .NET platform, coming from a Java background, is the increased productivity you get with such an integrated IDE and the runtime &#8211; no need to archive up artefacts and deploy to a container (in the Java sense that is, I know .NET has assemblies).  The &#8216;feed-back loop&#8217; is greatly reduced and by this I mean the amount of time between making a change in code and seeing the results in the execution of your application on the screen.  </p>
<p>I know there are a number of tricks you can do with Java and various containers with exploded WARs and improved &#8220;Hot deployments&#8221; but I was blown away when recently discovering JavaRebel from Zeroturnaround.  How I wished I had this neat little JVM plugin when I was developing production code in Java &#8211; now, it&#8217;s saving me time with some home grown projects &#8211; just to keep my finger in Java (so to speak).</p>
<p>Without going into all the details &#8211; as it&#8217;s better explained on the <a href="http://www.zeroturnaround.com/javarebel/installation/">Zero turnaround</a> site this is all that is required to add the plugin to the JVM:</p>
<p>-noverify -javaagent:/path/to/javarebel/lib/javarebel.jar -Drebel.dirs=/paths/to/class/folders/bin</p>
<p>As I am running with the <a href="http://www.springframework.org/">Springframework</a> I also had to add:</p>
<p>-Drebel.spring_plugin=true</p>
<p>See <a href="http://www.zeroturnaround.com/blog/integrating-javarebel-with-spring/">Integrating JavaRebel with Spring</a></p>
<p>There are a number of other ways to integrate and a few extras such as a Maven plugin &#8211; just to make things even easier!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=32&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/04/17/improving-the-feedback-loop-in-java-with-javarebel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>

		<media:content url="http://paulfeaviour.files.wordpress.com/2009/04/javarebel.jpg" medium="image">
			<media:title type="html">javarebel</media:title>
		</media:content>
	</item>
		<item>
		<title>Google App Engine</title>
		<link>http://paulfeaviour.wordpress.com/2009/04/17/google-app-engine/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/04/17/google-app-engine/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 08:33:27 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Googel App Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=30</guid>
		<description><![CDATA[  With the recent announcement that Google App Engine has added Java support I thought I&#8217;d have a little go myself to see just how easy it is to get an application up and running. Getting Started First things first, I registered a Google account with the Google App Engine &#8211; an account is required to manage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=30&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-97 alignleft" title="appengine_lowres" src="http://paulfeaviour.files.wordpress.com/2009/04/appengine_lowres.gif?w=142&#038;h=109" alt="appengine_lowres" width="142" height="109" /> </p>
<p>With the recent announcement that <a href="http://code.google.com/appengine/">Google App Engine</a> has added Java support I thought I&#8217;d have a little go myself to see just how easy it is to get an application up and running.</p>
<h3>Getting Started</h3>
<p>First things first, I registered a Google account with the Google App Engine &#8211; an account is required to manage the applications in the &#8220;cloud&#8221;.</p>
<p>Next I downloaded and installed the Google App Engine Java SDK &#8211; actually, I downloaded and installed the <a href="http://code.google.com/appengine/docs/java/tools/eclipse.html/">Google Plugin for Eclipse</a> that includes the SDK. The plugin for Eclipse 3.4 (Ganymede) can be downloaded from http://dl.google.com/eclipse/plugin/3.4 (for full steps checkout the Google online documentation).</p>
<p>With the plugin and SDK installed Eclipse has some nice new icons in the tool bar:</p>
<p align="center"><img title="eclipse_toolbar1" src="http://paulfeaviour.files.wordpress.com/2009/04/eclipse_toolbar1.jpg?w=80&#038;h=28" border="0" alt="eclipse_toolbar1" width="80" height="28" /></p>
<p>Now it&#8217;s time to create an application!</p>
<p>To create a &#8220;New Web Application Project&#8221; select <img title="new_app_button" src="http://paulfeaviour.files.wordpress.com/2009/04/new_app_button.png?w=20&#038;h=20" border="0" alt="new_app_button" width="20" height="20" /> or via the menu: <strong>File &gt; New &gt; Web Application Project</strong>.  Provide a project and package name for the application then uncheck &#8220;Use Google Web Toolkit&#8221; and leave &#8220;Use Google App Engine&#8221; activated. This will create a skeleton project with a simple &#8220;Hello, World&#8221; example with a typical web application directory structure &#8211; nothing out of the ordinary:</p>
<pre><code>src/</code>
<code>  guestbook/</code>
<code>    server/</code>
<code>      GuestbookServlet.java</code>
<code>    META-INF/</code>
<code>      jdoconfig.xml</code>
<code>    log4j.properties</code>
<code>    logging.properties</code>
<code>war/</code>
<code>  WEB-INF/</code>
<code>    classes/</code>
<code>      ...Eclipse compiled classes...</code>
<code>    lib/</code>
<code>      ...App Engine JARs...</code>
<code>    appengine-web.xml</code>
<code>    web.xml</code>
<code>  index.html</code></pre>
<p>You&#8217;ll notice that the Java code resides in the <code>src/</code> directory, code is compiled and class files are copied to the <code>war/WEB-INF/classes</code> directory.   Other non-code files, such as <code>log4j.properties</code> etc. are also copied to the <code>war/</code> directory structure as the Eclipse plugin uses the <code>war/</code> directory for running the development server, and for deploying the app to App Engine</p>
<h3>Running the application</h3>
<p>The great thing about the App Engine SDK is that you do not have to deploy to it to see your handy work, this is because the SDK includes a web server inside the Eclipse debugger that will simulate the live environment. To run locally, simply select the <strong>Run</strong> menu, <strong>Debug As</strong> &gt; <strong>Web Application</strong>. Eclipse will build the project and switch to the Debug perspective. If all has gone well and the server starts successful you should see several messages, including:</p>
<p><code>The server is running at http://localhost:8080/</code></p>
<p>Open this URL in your browser and you should see your first App Engine application!</p>
<p>In Eclipse, you can make changes to source code including JSPs, static files and the <code>appengine-web.xml</code> and they will be dynamically reloaded when you save file as long as you leave the server running in the debugger. If you need to change the <code>web.xml</code> or other configuration files, you will need to restart the server for the changes to take effect.</p>
<h3>Deploying to App Engine</h3>
<p>To upload an application for the first time it needs to be registered with an associated application ID, this can be done using <a href="http://code.google.com/appengine/docs/theadminconsole.html">the Admin Console</a>. Once the application is registered edit <code>the appengine-web.xml</code> file and change the  <code>&lt;application&gt;...&lt;/application&gt; </code> element to contain the new application ID.</p>
<p>Now we can simply use the deploy button:  <img src="http://code.google.com/appengine/docs/java/tools/eclipse/ae_deploy_button.png" border="0" alt="The App Engine deploy button." width="22" height="22" /> to deploy the application to the App Engine &#8211; this will prompt you for your administrator account username (your email address) and password.   </p>
<p>Once deployed test your application on App Engine by visiting its URL:<br />
<code>http://&lt;your application ID&gt;.appspot.com/guestbook</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=30&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/04/17/google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>

		<media:content url="http://paulfeaviour.files.wordpress.com/2009/04/appengine_lowres.gif" medium="image">
			<media:title type="html">appengine_lowres</media:title>
		</media:content>

		<media:content url="http://paulfeaviour.files.wordpress.com/2009/04/eclipse_toolbar1.jpg" medium="image">
			<media:title type="html">eclipse_toolbar1</media:title>
		</media:content>

		<media:content url="http://paulfeaviour.files.wordpress.com/2009/04/new_app_button.png" medium="image">
			<media:title type="html">new_app_button</media:title>
		</media:content>

		<media:content url="http://code.google.com/appengine/docs/java/tools/eclipse/ae_deploy_button.png" medium="image">
			<media:title type="html">The App Engine deploy button.</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Groovy</title>
		<link>http://paulfeaviour.wordpress.com/2009/04/13/getting-groovy/</link>
		<comments>http://paulfeaviour.wordpress.com/2009/04/13/getting-groovy/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 16:23:30 +0000</pubDate>
		<dc:creator>paulfeaviour</dc:creator>
				<category><![CDATA[Groovy/Grails]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://paulfeaviour.wordpress.com/?p=4</guid>
		<description><![CDATA[Since starting my new job with Zyb I&#8217;ve been immersed with C# and the .NET platform, all new and great stuff.  Today, however, I decided to have another look at Groovy and the Grails framework and stumbled across the GroovyMag (just shows how long ago it was that I&#8217;d last looked at Groovy).  The current [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=4&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">Since starting my new job with Zyb I&#8217;ve been immersed with C# and the .NET platform, all new and great stuff.  Today, however, I decided to have another look at Groovy and the Grails framework and stumbled across the GroovyMag (just shows how long ago it was that I&#8217;d last looked at Groovy).  The current issue is: <a href="http://www.groovymag.com/main.issues.description/id=8/">http://www.groovymag.com/main.issues.description/id=8/</a> </div>
<div id="attachment_8" class="wp-caption alignnone" style="width: 210px"><img class="size-full wp-image-8" title="GroovyMag" src="http://paulfeaviour.files.wordpress.com/2009/04/gm6_4001.gif?w=200&#038;h=259" alt="GroovyMag April" width="200" height="259" /><p class="wp-caption-text">GroovyMag April</p></div>
<p>and is well worth a read.  Inside the April edition is an article by Jeremy Anderson (<a href="http://blog.code-adept.com/">http://blog.code-adept.com/</a>) on Groovy and Flex and it demonstrates just how easy it is to expose Grails services for Flex remoting.</p>
<p>Utilising the Flex plugin (<a href="http://docs.codehaus.org/display/GRAILS/Flex+Plugin">http://docs.codehaus.org/display/GRAILS/Flex+Plugin</a>) to provide integration between Grails and Flex/BlazeDS you can get a rich internet application (RIA) up and running in next to no time.  The plugin automtically provides the configuration required for servlets etc. in the web descriptor and takes advantage of the reloading facilities of Grails registering services with the Flex message broker without the need for an application restart (although any modifications to the Flex app itself seemed to require a restart&#8230;).</p>
<p>To expose a Grails service for Flex remoting simply add the <em>expose</em> property to your service class:</p>
<pre>class SimpleService {
  static expose = ['flex-remoting']
  def doSomething() {
    return "This is so easy"
  }
}</pre>
<p>Now you can use the service within your Flex application without any other configuration by referencing thus:</p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml</a>"&gt;
    &lt;mx:RemoteObject id="simpleService " destination="simpleService "/&gt;
    &lt;mx:Button label="Click me!!" click="simpleService.doSomething()"/&gt;
    &lt;mx:TextInput text="{simpleService.doSomething.lastResult}"/&gt;
&lt;/mx:Application&gt;</pre>
<p>The example above is very straight forward &#8211; for a more indepth tutorial see the GroovyMag or Marcel Overdijk&#8217;s blog:  <a href="http://marceloverdijk.blogspot.com/search/label/Flex">http://marceloverdijk.blogspot.com/search/label/Flex</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/paulfeaviour.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/paulfeaviour.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/paulfeaviour.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=paulfeaviour.wordpress.com&amp;blog=7329678&amp;post=4&amp;subd=paulfeaviour&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy sd-like-enabled"></div>]]></content:encoded>
			<wfw:commentRss>http://paulfeaviour.wordpress.com/2009/04/13/getting-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eb27c974d88a5e58f49f958a21550301?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulfeaviour</media:title>
		</media:content>

		<media:content url="http://paulfeaviour.files.wordpress.com/2009/04/gm6_4001.gif" medium="image">
			<media:title type="html">GroovyMag</media:title>
		</media:content>
	</item>
	</channel>
</rss>
