<?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>Sven Lange</title>
	<atom:link href="http://www.svenlange.co.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.svenlange.co.za</link>
	<description></description>
	<lastBuildDate>Thu, 06 Oct 2011 16:13:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google Go Websocket server and Smoothie Charts client</title>
		<link>http://www.svenlange.co.za/2011/02/google-go-websocket-server-and-smoothie-charts-client/</link>
		<comments>http://www.svenlange.co.za/2011/02/google-go-websocket-server-and-smoothie-charts-client/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 21:07:02 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Frontend]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Google Go]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Smoothie Charts]]></category>
		<category><![CDATA[Websocket]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=340</guid>
		<description><![CDATA[Recently I enjoyed getting my hands dirty with Google Go a fairly new GPL targeted at systems programming. To get to know the language a little better I came up with the idea to program a websocket server that sends out some &#8230; <a href="http://www.svenlange.co.za/2011/02/google-go-websocket-server-and-smoothie-charts-client/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I enjoyed getting my hands dirty with <a href="http://golang.org/">Google Go</a> a fairly new GPL targeted at systems programming. To get to know the language a little better I came up with the idea to program a websocket server that sends out some data to a browser that visualizes those in a chart. I got the inspiration for this from <a href="http://joewalnes.com/2010/08/10/introducing-smoothie-charts/">Joe Walnes blog entry</a> about <a href="http://smoothiecharts.org/">Smoothie Charts</a>. Smoothie Charts is a little JavaScript library to visualize real-time data in a <a href="http://en.wikipedia.org/wiki/Canvas_element">HTML5 canvas</a>.</p>
<p>The <a href="https://github.com/svenlange/websocket/blob/master/server/server.go">websocket server implementation</a> is pretty simple as Go already has some build-in <a href="http://golang.org/pkg/websocket/">websocket support</a>. The server sends out the sine function with a value range from -1 to +1 to the client. The result can be seen in the following pictures and all source code be downloaded from github: <a href="https://github.com/svenlange/websocket">https://github.com/svenlange/websocket</a></p>
<div id="attachment_344" class="wp-caption alignnone" style="width: 421px"><a href="http://www.svenlange.co.za/wp-content/uploads/2011/02/sinusSmoothieChart1.png"><img class="size-full wp-image-344" title="Sinus Smoothie Chart" src="http://www.svenlange.co.za/wp-content/uploads/2011/02/sinusSmoothieChart1.png" alt="" width="411" height="275" /></a><p class="wp-caption-text">New value every 500ms. Alternation +0.05</p></div>
<div id="attachment_343" class="wp-caption alignnone" style="width: 427px"><a href="http://www.svenlange.co.za/wp-content/uploads/2011/02/sinusSmoothieChartHeavyLoad1.png"><img class="size-full wp-image-343" title="Sinus Smoothie Chart under heavy load" src="http://www.svenlange.co.za/wp-content/uploads/2011/02/sinusSmoothieChartHeavyLoad1.png" alt="" width="417" height="275" /></a><p class="wp-caption-text">New value every 5ms. Alternation +0.01</p></div>
<p>The second pictures sine curve looks a bit creepy because my computers CPU utilization was at a maximum and somehow my computer was not able to take a better screenshot. The chart was smoother on my monitor.</p>
<p>This setup/technology could maybe be used to visualize <em>real-time</em> stock exchange trends or the current bandwidth utilization in a data center etc. within a browser. Very nice.</p>
<p>Thanks to Gary Burd for his <a href="http://gary.beagledreams.com/page/go-websocket-chat&quot;&gt;http://gary.beagledreams.com/page/go-websocket-chat">websocket example</a>. It helped me to get my job done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2011/02/google-go-websocket-server-and-smoothie-charts-client/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FOSDEM 2011</title>
		<link>http://www.svenlange.co.za/2011/02/fosdem-2011/</link>
		<comments>http://www.svenlange.co.za/2011/02/fosdem-2011/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 16:11:53 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[FOSDEM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SystemTap]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=331</guid>
		<description><![CDATA[This january I attended the FOSDEM in Brussels for the first time. Before I only visited those expensive enterprise conferences like JAOO, JAX and the like. It really was a great experience. A free conference (in terms of registrations fees) &#8230; <a href="http://www.svenlange.co.za/2011/02/fosdem-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This january I attended the <a href="http://www.fosdem.org">FOSDEM</a> in Brussels for the first time. Before I only visited those expensive enterprise conferences like JAOO, JAX and the like. It really was a great experience. A free conference (in terms of registrations fees) about free and open source software. I hope I can attend it next year again.</p>
<p>I stayed at the <a href="http://wiki.debian.org/Java/DevJam/2011/Fosdem">Java Dev-Room</a> for most of the time. The speakers there were not the best presenters (cause they are real geeks) but still they gave me inspiration and I could widen my horizon by learning new stuff from them.</p>
<p><a href="http://www.svenlange.co.za/wp-content/uploads/2011/02/fosdem2001_java.jpg"><img class="size-medium wp-image-332 alignnone" title="Java crew at FOSDEM 2011" src="http://www.svenlange.co.za/wp-content/uploads/2011/02/fosdem2001_java-300x175.jpg" alt="" width="300" height="175" /></a></p>
<p>One nice thing was that some companies (Oracle, <a href="http://www.tarent.de/web/tarent/home">tarent</a>, &#8230;) were sponsoring a dinner. The conversations with the participating Java folks were very nice. We talked a little about everything concerning IT stuff. From different hardware architectures to design patterns and political stuff.</p>
<p>One neat tool I have to look into is <a href="http://sourceware.org/systemtap/">SystemTap</a>. It enables one to do sophisticated application diagnosis on a Linux OS. For example trace down a Java method call through the JVM down to the native system call. Pretty detailed and interesting tool if one is faced with very tricky performance or functional problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2011/02/fosdem-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion Client for Windows</title>
		<link>http://www.svenlange.co.za/2011/01/subversion-client-for-windows/</link>
		<comments>http://www.svenlange.co.za/2011/01/subversion-client-for-windows/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 16:53:17 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Versioning]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=313</guid>
		<description><![CDATA[If you hate that TortoiseSVN slows down your Windows developer machine and you need to grab some source code from a Subversion server there is the following alternative. Just use a command line tool that is lightning fast: Subversion for &#8230; <a href="http://www.svenlange.co.za/2011/01/subversion-client-for-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you hate that <a href="http://tortoisesvn.net/">TortoiseSVN</a> slows down your Windows developer machine and you need to grab some source code from a Subversion server there is the following alternative.</p>
<p>Just use a command line tool that is lightning fast: <a href="http://sourceforge.net/projects/win32svn/">Subversion for Windows</a></p>
<p>To checkout some source code simple type: <em>svn co &lt;host&gt;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2011/01/subversion-client-for-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>yUML is only for simple UML class diagrams</title>
		<link>http://www.svenlange.co.za/2010/12/yuml-is-only-for-simple-uml-class-diagrams/</link>
		<comments>http://www.svenlange.co.za/2010/12/yuml-is-only-for-simple-uml-class-diagrams/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 20:19:36 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[UML]]></category>
		<category><![CDATA[yUML]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=280</guid>
		<description><![CDATA[I sat down for a while and extended the Grails Create Domain UML Plugin that I wrote about a couple month ago in this post. This plugin helps to generate UML class diagrams with yUML from a Grails domain model. &#8230; <a href="http://www.svenlange.co.za/2010/12/yuml-is-only-for-simple-uml-class-diagrams/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I sat down for a while and extended the <a href="http://www.grails.org/plugin/create-domain-uml">Grails Create Domain UML Plugin</a> that I wrote about a couple month ago <a href="http://www.svenlange.co.za/2010/01/generating-uml-class-diagrams-from-grails-domain-model/">in this post</a>. This plugin helps to generate <a href="http://en.wikipedia.org/wiki/Class_diagram">UML class diagrams</a> with <a href="http://yuml.me/">yUML</a> from a Grails domain model. Unfortunately the diagrams don&#8217;t show aggregations or compositions and the associations don&#8217;t have a name. I fixed that, but the generated diagrams are not really useable, because yUML is only for very simple UML class diagrams as you can see in the following pictures.</p>
<div id="attachment_282" class="wp-caption alignnone" style="width: 310px"><a href="http://www.svenlange.co.za/wp-content/uploads/2010/12/yuml_topDown.png"><img class="size-medium wp-image-282 " title="yuml_topDown" src="http://www.svenlange.co.za/wp-content/uploads/2010/12/yuml_topDown-300x289.png" alt="" width="300" height="289" /></a><p class="wp-caption-text">Neat top down</p></div>
<div id="attachment_283" class="wp-caption alignnone" style="width: 310px"><a href="http://www.svenlange.co.za/wp-content/uploads/2010/12/yuml_leftRight.png"><img class="size-medium wp-image-283 " title="yuml_leftRight" src="http://www.svenlange.co.za/wp-content/uploads/2010/12/yuml_leftRight-300x134.png" alt="" width="300" height="134" /></a><p class="wp-caption-text">Neat left right</p></div>
<p>Conclusion: yUML looks nice, but is only usable for very simple diagrams.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/12/yuml-is-only-for-simple-uml-class-diagrams/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remove user from cache in Grails app using Acegi Plugin</title>
		<link>http://www.svenlange.co.za/2010/12/remove-user-from-cache-in-grails-app-using-acegi-plugin/</link>
		<comments>http://www.svenlange.co.za/2010/12/remove-user-from-cache-in-grails-app-using-acegi-plugin/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 13:06:23 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Acegi]]></category>
		<category><![CDATA[Cache]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=239</guid>
		<description><![CDATA[The Grails Acegi Plugin has user caching activated by default. If you make any changes to a user those changes won't be available immediately. This post shows two solutions how to change this behavior. <a href="http://www.svenlange.co.za/2010/12/remove-user-from-cache-in-grails-app-using-acegi-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://grails.org/plugin/acegi">Grails Acegi Plugin</a> has <a href="http://static.springsource.org/spring-security/site/docs/2.0.x/apidocs/org/springframework/security/providers/dao/cache/EhCacheBasedUserCache.html">user caching</a> activated by default. If you make any changes to a user those changes won&#8217;t be available immediately. Here are two solutions to change this behavior.</p>
<h2>Remove the user from cache</h2>
<p>The Acegi plugin provides a userCache bean which can be injected automatically. With a <em>removeUserFromCache </em>method call on the userCache bean a user can be removed from the cache.  The next time the user is requested by the system the user will be retrieved from the database and all updates to the instance are available immediately. Following code fragment shows the described solution.</p>
<pre class="brush: java; title: ; notranslate">
def userCache

def someAction = {
	GrailsUser user = authenticateService.principal() as GrailsUser
	userCache.removeUserFromCache(user)
}
</pre>
<h2>Disable the cache</h2>
<p>The second solution is to simply disable the cache. This should not have any impact on applications with little usage. This of cause increases the communication between your application and a database server. To disable the cache add the following line of code to the &lt;app-root&gt;/grails-app/conf/SecurityConfig.groovy file.</p>
<pre class="brush: java; title: ; notranslate">
cacheUsers = false
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/12/remove-user-from-cache-in-grails-app-using-acegi-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight testing landscape</title>
		<link>http://www.svenlange.co.za/2010/11/silverlight-testing-landscape/</link>
		<comments>http://www.svenlange.co.za/2010/11/silverlight-testing-landscape/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 14:02:30 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Coverage]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=191</guid>
		<description><![CDATA[This post gives an overview of the .NET testing landscape including many available tools and frameworks with a focus on testing Silverlight projects. <a href="http://www.svenlange.co.za/2010/11/silverlight-testing-landscape/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I did some research to find out how to test Silverlight 3 applications. I wanted to have an automated build on a CI server (TeamCity) that does some unit and integration testing plus a code coverage report. Soon I saw that there are a lot of tools and frameworks out there. To get an overview of whats available and useful, I started the following list. Feel free to share your thoughts.<br />
<span id="more-191"></span></p>
<h2>Testing Frameworks</h2>
<ul>
<li><a href="http://code.msdn.microsoft.com/silverlightut">Silverlight Unit Test Framework (SLUT)</a> included in the <a href="http://silverlight.codeplex.com/">Silverlight Toolkit </a>
<ul>
<li><a href="http://www.jeff.wilcox.name/2009/11/november-walkthrough/">Code Coverage Howto</a></li>
<li><a href="http://www.msteched.com/2010/NorthAmerica/WEB205">Tech Ed 2010 &#8211; Unit Testing in Microsoft Silverlight (Video)</a></li>
<li><a href="http://www.jeff.wilcox.name/blog/">Jeff Wilcox &#8211; Blog of the developer behind the framework</a></li>
</ul>
</li>
<li><a href="http://www.nunit.org/">NUnit</a></li>
<li><a href="www.mbunit.com">MBUnit</a></li>
<li><a href="http://xunit.codeplex.com/">xUnit.net &#8211; Unit Testing for .NET</a></li>
<li><a href="http://cthru.codeplex.com/">CThru and SilverUnit</a>
<ul>
<li><a href="http://site.typemock.com/silverlight_unit_testing_page">Unit Testing Silverlight with SilverUnit (Video)</a></li>
</ul>
</li>
<li><a href="http://testapi.codeplex.com/">TestApi &#8211; a library of Test APIs</a></li>
<li><a href="http://www.jetbrains.com/dotcover">dotCover – .NET Code Coverage Tool</a></li>
<li><a href="http://www.ncover.com/">NCover &#8211; Code Coverage for .NET Developers</a></li>
<li><a href="http://white.codeplex.com/">White &#8211; Framework for automating rich client applications based on many different platforms</a>
<ul>
<li>Seems not very mature</li>
<li>Silverlight 3 not offically supported yet as of 31 Oct 2010</li>
</ul>
</li>
<li><a href="http://statlight.codeplex.com">StatLight &#8211; Silverlight Testing Automation Tool</a></li>
<li><a href="http://www.telerik.com/automated-testing-tools.aspx">Telerik &#8211; Automated Testing Tools for Web Application Testing</a> (<a href="http://tv.telerik.com/watch/automated-testing-tools/telerik-webui-test-studio-qa-edition-silverlight-testing-best-practices">Webcast</a>)
<ul>
<li>WebUI Test Studio QA Edition – $2,499 USD</li>
<li>WebUI Test Studio Developer Edition – $1,499 USD</li>
<li>WebUI Test Studio Bundle – $2,999 USD</li>
</ul>
</li>
<li><a href="http://www.telerik.com/products/web-testing-tools/webaii-framework-features.aspx">Telerik free WebAii Testing Framework</a></li>
<li><a href="http://code.google.com/p/silverlight-selenium/">silverlight-selenium</a>
<ul>
<li>Too old</li>
</ul>
</li>
</ul>
<h2>IDE Extensions</h2>
<ul>
<li><a href="http://www.jetbrains.com/resharper">ReSharper &#8211; Visual Studio productivity tool</a>
<ul>
<li><a href="http://agunit.codeplex.com">AgUnit &#8211; Silverlight unit testing with ReSharper</a></li>
</ul>
</li>
<li><a href="http://www.jetbrains.com/profiler/">dotTrace &#8211; Performance and Memory Profiler</a></li>
<li><a href="http://www.testdriven.net">TestDriven.Net &#8211; Zero Friction Unit Testing Add-In</a></li>
<li>Telerik JustCode &#8211; Plug-in for Real Time Code Analysis</li>
<li><a href="http://www.typemock.com/typemock-isolator-product3/">Typemock Unit Testing Tools &#8211; Isolator 2010 (Test any code, &#8230;, Increase coverage)</a></li>
<li><a href="http://www.red-gate.com/products/dotnet_tools_overview.htm">Red Gate .NET Developer Bundle </a>
<ul>
<li>ANTS Performance Profiler Pro &#8211; Identify bottlenecks and ensure code is performing optimally</li>
<li>ANTS Memory Profiler &#8211; Find and fix memory leaks in your .NET applications</li>
<li>Exception Hunter &#8211; Locate the unhandled exceptions your method can throw</li>
<li>.NET Reflector Pro &#8211; Seamlessly debug into third-party code and assemblies, even if you don&#8217;t have the source code for them</li>
</ul>
</li>
</ul>
<h2>Mocking</h2>
<p>An interesting page about mock frameworks can be found <a href="http://stackoverflow.com/questions/2637066/rhino-mock-vs-typemock-vs-justmock-vs">here</a>. One guy there is saying moq has a much cleaner API than Rhino by similar capabilities. Also the guy behind SLUT recommends moq.</p>
<ul>
<li><a href="http://www.telerik.com/products/mocking.aspx">JustMock Telerik</a></li>
<li><a href="http://code.google.com/p/moq/">moq &#8211; Mocking library for .NET 3.5 and Silverlight with deep C# 3.0 integration</a></li>
<li><a href="http://ayende.com/projects/rhino-mocks.aspx">Rhino Mocks &#8211; A dynamic mock object framework for the .Net platform</a></li>
<li><a href="http://research.microsoft.com/en-us/projects/pex/default.aspx">Pex and Moles &#8211; Isolation and White box Unit Testing for .NET</a>
<ul>
<li><a href="http://research.microsoft.com/en-us/projects/moles/">Moles &#8211; Isolation framework for .NET</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/11/silverlight-testing-landscape/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JAOO 2010</title>
		<link>http://www.svenlange.co.za/2010/10/jaoo-2010/</link>
		<comments>http://www.svenlange.co.za/2010/10/jaoo-2010/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 14:15:10 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[JAOO]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=325</guid>
		<description><![CDATA[This years JAOO conference was quite nice again. I was not able to attend all the sessions I wanted to, but just being there and meeting new people is worth it already. For example Mr. Gosling. ;-) Or of cause &#8230; <a href="http://www.svenlange.co.za/2010/10/jaoo-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This years JAOO conference was quite nice again. I was not able to attend all the sessions I wanted to, but just being there and meeting new people is worth it already. For example <a href="http://nighthacks.com">Mr. Gosling</a>. ;-) Or of cause <a href="http://rohdef.dk">Rohde</a> who was so kind to give us a place to stay during the conference. Thanks mate.</p>

<a href='http://www.svenlange.co.za/2010/10/jaoo-2010/back-camera/' title='Gosling and me at JAOO (GOTOCON)'><img width="150" height="150" src="http://www.svenlange.co.za/wp-content/uploads/2011/02/gosling_jaoo_me-150x150.jpg" class="attachment-thumbnail" alt="Gosling and me at JAOO (GOTOCON)" title="Gosling and me at JAOO (GOTOCON)" /></a>
<a href='http://www.svenlange.co.za/2010/10/jaoo-2010/rohdejme/' title='Jakob, Rohde and me'><img width="150" height="150" src="http://www.svenlange.co.za/wp-content/uploads/2010/10/rohdeJMe-150x150.jpg" class="attachment-thumbnail" alt="Jakob, Rohde and me" title="Jakob, Rohde and me" /></a>
<a href='http://www.svenlange.co.za/2010/10/jaoo-2010/back-camera-2/' title='gotocon2010'><img width="150" height="150" src="http://www.svenlange.co.za/wp-content/uploads/2010/10/gotocon2010-150x150.jpg" class="attachment-thumbnail" alt="gotocon2010" title="gotocon2010" /></a>

<p>What I really have to look into is how concurrent programming will be done in the future on the Java platform. Brian Goetz did a really <a href="http://gotocon.com/aarhus-2010/presentation/Data%20parallelism%20in%20Java">interesting talk</a> about this topic.</p>
<p>Besides that I couldn&#8217;t get more inspiration from this years conference. But that is OK. Denmark is a great country and it is always a good thing to stop by. After the conference I had some time to travel up to Aalborg and Skagen and then drive back to Germany along the Danish coast side visiting Klitmøller etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/10/jaoo-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 offline capabilities for web applications</title>
		<link>http://www.svenlange.co.za/2010/08/html5-offline-capabilities-for-web-applications/</link>
		<comments>http://www.svenlange.co.za/2010/08/html5-offline-capabilities-for-web-applications/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 12:17:43 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Frontend]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[localStorage]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=165</guid>
		<description><![CDATA[Inspired by a HTML5 GTUG-Campout Meeting I decided to play around a little with HTML5. In this post I will show an example how to create book instances in a book management web application while being offline and push all &#8230; <a href="http://www.svenlange.co.za/2010/08/html5-offline-capabilities-for-web-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Inspired by a <a href="http://www.meetup.com/GTUG-Campout">HTML5 GTUG-Campout Meeting</a> I decided to play around a little with HTML5. In this post I will show an example how to create book instances in a book management web application while being offline and push all the books into the database by the time the user is online again.</p>
<p>The use case for my little example is the following: A user is offline and wants to enter some new books into a book management web application.</p>
<p>OK the first question that arises is: How can a client detect whether it is on- or offline? The answer is it shouldn&#8217;t be automatically and you can find a good answer to that <a href="http://code.google.com/intl/de-DE/apis/gears/gears_faq.html#isOnlineFunction">here</a>. So the user needs to be aware whether he is online or not and triggers a syncronisation with the web server by himself.</p>
<p>In HTML5 you have a client side storage where you can place stuff. It is a key/value pair storage with a maximum size of 5MB per <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin-0">origion</a>. To persist an object (in my example a book) you best better use <a href="http://www.json.org/js.html">JSON</a>. The following code snipplet shows a JavaScript function called <em>preserve</em> that collects all entered details for a book from an input page and places the result in the local storage. The local storage can be accessed with <em>localStorage </em>as you can see in line 15.</p>
<pre class="brush: jscript; title: ; notranslate">
function preserve() {

	function getValueById(id) {
		return document.getElementById(id).value;
	}

	var JSONbook = {
		&quot;title&quot; : getValueById(&quot;title&quot;),
		&quot;isbn&quot; : getValueById(&quot;isbn&quot;),
		&quot;author&quot; : getValueById(&quot;author1&quot;)
	};

	var bookString = JSON.stringify(JSONbook);

	localStorage.setItem(localStorage.length + 1, bookString);
}
</pre>
<p>Due to the fact that you can only place strings into the key/value store one has to convert the JSON object into a string. This can be achivied with the help of the following free <a href="http://www.json.org/json2.js">javascript stringifier/parser</a> which I use here in line 13.</p>
<p>Of course <em>localStorage.length + 1</em> is not a good way to generate a key, but for this experimental example it suits the needs.</p>
<p>So now when a user is back online and decides he wants to push all the newly created books into the database server a little Javascript like the following could do the job for him. For example by clicking on a button the <em>persistAllBooks</em> gets invoked. This function sequentially reads all book objects from the localStorage and calls the <a href="http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit">post_to_url</a> function for each book. <em>post_to_url</em> builds up a form, fills it with the books attributes and pushes them to the server.</p>
<pre class="brush: jscript; title: ; notranslate">
function persistAllBooks() {
	for (var i = 1; i &lt;= localStorage.length; i++) {
		var item = localStorage.getItem(i);
		var parse = JSON.parse(item);
		post_to_url(parse);
	}

}

function post_to_url(params) {
	var form = document.createElement(&quot;form&quot;);
	form.setAttribute(&quot;method&quot;, &quot;post&quot;);
	form.setAttribute(&quot;action&quot;, &quot;/bookmngt/book/save&quot;);

	for (var key in params) {
		var hiddenField = document.createElement(&quot;input&quot;);
		hiddenField.setAttribute(&quot;type&quot;, &quot;hidden&quot;);
		hiddenField.setAttribute(&quot;name&quot;, key);
		hiddenField.setAttribute(&quot;value&quot;, params[key]);

		form.appendChild(hiddenField);
	}

	document.body.appendChild(form);
	form.submit();
}
</pre>
<p>Thats it. Of cource the book creation page needs to be <a href="http://diveintohtml5.org/offline.html">offline</a> available to the client and HTML5 is helping here too.</p>
<p>Thanks to <a href="http://www.thomas-asel.de">Thomas Asel</a> for brainstorming and talking about HTML5 which led to this post.</p>
<h2>HTML5 Resources</h2>
<p>The following list contains some good HTML5 resources I found on the net while experimenting a little.</p>
<p>Dive Into HTML 5 &#8211; <a href="http://diveintohtml5.org/">diveintohtml5.org</a><br />
Browsers with Wings &#8211; <a href="http://www.slideshare.net/remy.sharp/browsers-with-wings">slideshare.net/remy.sharp/browsers-with-wings</a><br />
HTML5 on Wikipedia &#8211; <a href="http://en.wikipedia.org/wiki/HTML5">en.wikipedia.org/wiki/HTML5</a><br />
&#8220;Offline&#8221;: What does it mean and why should I care? &#8211; <a href="http://www.html5rocks.com/tutorials/offline/whats-offline/">www.html5rocks.com/tutorials/offline/whats-offline</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/08/html5-offline-capabilities-for-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Ehcaches UpdateChecker in Grails application</title>
		<link>http://www.svenlange.co.za/2010/02/disable-ehcaches-updatechecker-in-grails-application/</link>
		<comments>http://www.svenlange.co.za/2010/02/disable-ehcaches-updatechecker-in-grails-application/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 10:12:53 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Ehcache]]></category>
		<category><![CDATA[UpdateChecker]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=122</guid>
		<description><![CDATA[This post describes how to disable Ehcaches annoying and suspiciously talkative UpdateChecker in a Grails 1.2.0 application using Ehcache 1.7.1 as its 2nd level cache provider. <a href="http://www.svenlange.co.za/2010/02/disable-ehcaches-updatechecker-in-grails-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found it pretty annoying that Ehcache always reminded me that there is an update to a newer version of its framework available. After searching the web I found an <a href="http://forums.terracotta.org/forums/posts/list/2793.page">interesting thread in the Terracotta forum</a> saying that the <a href="http://ehcache.org/apidocs/net/sf/ehcache/util/UpdateChecker.html">UpdateChecker</a> is not only looking for updates. In addition it also submits information about the applications environment to Terracotta by default. And that is not a good thing in my opinion.</p>
<p>Here you can see youself: <a href="http://svn.terracotta.org/svn/ehcache/tags/ehcache-1.7.1/core/src/main/java/net/sf/ehcache/util/UpdateChecker.java">http://svn.terracotta.org/svn/ehcache/tags/ehcache-1.7.1/core/src/main/java/net/sf/ehcache/util/UpdateChecker.java</a></p>
<p>Fortunately you can disable this behavior by adding an Ehcache configuration to your Grails application. I have tested this with a Grails 1.2.0 application which includes Ehcache 1.7.1.</p>
<p>Simply place an ehcache.xml file in your <em>&lt;app-root&gt;/grails-app/conf</em> folder containing your Ehcache configuration. For this post I am using the configuration that ships with Ehcache as default (ehcache-failsafe.xml) and modify it.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ehcache xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;ehcache.xsd&quot; updateCheck=&quot;false&quot;&gt;

    &lt;diskStore path=&quot;java.io.tmpdir&quot;/&gt;

    &lt;defaultCache
            maxElementsInMemory=&quot;10000&quot;
            eternal=&quot;false&quot;
            timeToIdleSeconds=&quot;120&quot;
            timeToLiveSeconds=&quot;120&quot;
            overflowToDisk=&quot;true&quot;
            maxElementsOnDisk=&quot;10000000&quot;
            diskPersistent=&quot;false&quot;
            diskExpiryThreadIntervalSeconds=&quot;120&quot;
            memoryStoreEvictionPolicy=&quot;LRU&quot;
            /&gt;

&lt;/ehcache&gt;
</pre>
<p>With the attribute <em>updateCheck=&#8221;false&#8221;</em> in the root tag the haunting is gone.</p>
<p>XML Schema for Ehcache config can be found here: <a href="http://ehcache.org/ehcache.xsd">http://ehcache.org/ehcache.xsd</a></p>
<p>More Information about Ehcache configuration: <a href="http://ehcache.org/documentation/configuration.html">http://ehcache.org/documentation/configuration.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/02/disable-ehcaches-updatechecker-in-grails-application/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Recursively remove Subversions .svn folders</title>
		<link>http://www.svenlange.co.za/2010/02/recursively-remove-subversions-svn-folders/</link>
		<comments>http://www.svenlange.co.za/2010/02/recursively-remove-subversions-svn-folders/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 20:07:41 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Versioning]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=105</guid>
		<description><![CDATA[Howto recursively remove Subversions .svn folders. <a href="http://www.svenlange.co.za/2010/02/recursively-remove-subversions-svn-folders/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To remove all the sometimes pretty annoying <em>.svn</em> folders here are some very helpful lines of code.</p>
<pre class="brush: plain; title: ; notranslate">
for /f &quot;tokens=* delims=&quot; %%i in ('dir /s /b /a:d *svn') do (
rd /s /q &quot;%%i&quot;
)
</pre>
<p>Just place the above lines into a file called <strong>removeSvn.cmd</strong>, place it into the polluted folder and then run it. Done.</p>
<p>Another resources on this topic:</p>
<ul>
<li><a href="http://codesnippets.joyent.com/posts/show/104">Recursively remove all .svn directories</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/02/recursively-remove-subversions-svn-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating UML class diagrams from Grails domain model</title>
		<link>http://www.svenlange.co.za/2010/01/generating-uml-class-diagrams-from-grails-domain-model/</link>
		<comments>http://www.svenlange.co.za/2010/01/generating-uml-class-diagrams-from-grails-domain-model/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:06:04 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[UML]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=80</guid>
		<description><![CDATA[In this post I compare the existing Grails plugins to generate UML class diagrams. <a href="http://www.svenlange.co.za/2010/01/generating-uml-class-diagrams-from-grails-domain-model/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I tried some Grails plugins that generate UML class diagrams from the existing domain model in an Grails application. I found the following two plugins in the offical Grails plugin repository to play with.</p>
<ul>
<li><a href="http://www.grails.org/plugin/create-domain-uml">Create Domain UML 0.5</a> created by Al Phillips (<a href="http://code.google.com/p/grails-domain-uml/">Source code</a>)</li>
<li><a href="http://www.grails.org/plugin/class-diagram">Class diagram plugin 0.4.1</a> created by <a href="http://trygveamundsen.blogspot.com">Trygve Amundsen</a></li>
</ul>
<p>The application I used is a small book management app that manages a couple hundred books at my workplace.</p>
<p><span id="more-80"></span></p>
<h3>Create Domain UML plugin</h3>
<p>First I tried the <em>Create Domain UML</em> plugin. This plugin is very easy to install and actually consists only of one custom Grails  script called CreateDomainUml.groovy.</p>
<p>To generate the diagram the<a href="http://yuml.me/"> yuml.me</a> service is used. The service is totally free according to the faq section. But still his  might be a problem for some people as they cant send any source codes of there program across the internet. Well, you could run your own yuml service by <a href="http://yuml.me/getit">buying the software</a> and run it on an internal server.</p>
<p>To install the plugin into your Grails application simply enter the following command line command.</p>
<pre class="brush: plain; title: ; notranslate">
grails install-plugin create-domain-uml
</pre>
<p>To generate a class diagram just enter:</p>
<pre class="brush: plain; title: ; notranslate">
grails create-domain-uml
</pre>
<p>Ok enough texting. Let&#8217;s see what the plugin can do for us.</p>
<div id="attachment_82" class="wp-caption alignnone" style="width: 302px"><a href="http://www.svenlange.co.za/wp-content/uploads/2010/01/scroffyCreateDomainUMLPlugin.png"><img class="size-medium wp-image-82" title="scroffyCreateDomainUMLPlugin" src="http://www.svenlange.co.za/wp-content/uploads/2010/01/scroffyCreateDomainUMLPlugin-292x300.png" alt="UML Class Diagram" width="292" height="300" /></a><p class="wp-caption-text">Scroffy Top Down class diagram</p></div>
<div id="attachment_84" class="wp-caption alignnone" style="width: 302px"><a href="http://www.svenlange.co.za/wp-content/uploads/2010/01/createDomainUMLPlugin.png"><img class="size-medium wp-image-84" title="createDomainUMLPlugin" src="http://www.svenlange.co.za/wp-content/uploads/2010/01/createDomainUMLPlugin-292x300.png" alt="UML class diagram" width="292" height="300" /></a><p class="wp-caption-text">Orderly Top Down class diagram</p></div>
<p>The plugin creates a HTML-File and puts it into the applications root folder. On the page you see four links directing to www.yuml.me. Two of them will generate a Top Down class diagram (scroffy/orderly) as you can see above and the the other two a Right Left version of the class diagram (scroffy/orderly).</p>
<h3 id="pluginBoxTitle">Class diagram plugin</h3>
<p>Second up to try the <em>Class diagram plugin.</em> This plugin is not that easy to install. First you need to download and install <a href="http://www.graphviz.org/">Graphviz</a>. Graphviz is an open source graph visualization software licensed under the Common Public License Version 1.0.</p>
<p>The installation can be triggered by executing the following command line command.</p>
<pre class="brush: plain; title: ; notranslate">
grails install-plugin class-diagram
</pre>
<p>After some configuring and starting up your Grails application class diagrams can be generated by invoking <em>http://localhost:8080/classDiagram</em>. The result could look like the following.</p>
<div id="attachment_89" class="wp-caption alignnone" style="width: 199px"><a href="http://www.svenlange.co.za/wp-content/uploads/2010/01/classDiagramPlugin.png"><img class="size-medium wp-image-89" title="classDiagramPlugin" src="http://www.svenlange.co.za/wp-content/uploads/2010/01/classDiagramPlugin-189x300.png" alt="UML Class Diagram" width="189" height="300" /></a><p class="wp-caption-text">Class diagram generated by Class Diagram Plugin</p></div>
<p>The plugin comes with a mass of config possibilities I had not a deep look into. There you can change the diagrams direction (TopDown/RightLeft), appearance and level of detail.</p>
<p>Little downsite of the plugins is that its views depend on JQuery so might look ugly without. But it is still possible to generate the desired diagram.</p>
<h3>Conclusion</h3>
<p><a href="http://www.grails.org/plugin/create-domain-uml">Create Domain UML</a> is way easier to install and has fancy but not so detailed diagrams.</p>
<p><a href="http://www.grails.org/plugin/class-diagram">Class diagram plugin</a> is not so easy to install and has a lot configs. The diagram itself does not look so nice but is more detailed.</p>
<p>For my docs I used <em>Class diagram plugin</em> although it doesn&#8217;t look so neat. For me it was more important that the diagram shows all details of the model.</p>
<p>Hopefully we will see some improvements to the <em>Create Domain UML</em> plugin, because it is easy to use and looks nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/01/generating-uml-class-diagrams-from-grails-domain-model/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Give the tomcat a bit more memory</title>
		<link>http://www.svenlange.co.za/2010/01/give-the-tomcat-a-bit-more-memory/</link>
		<comments>http://www.svenlange.co.za/2010/01/give-the-tomcat-a-bit-more-memory/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:24:55 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=69</guid>
		<description><![CDATA[If Tomcat needs more memory then you have to add the following line to the catalina config file. Windows (catalina.bat) Grails 1.2 default PermGen memory is set to 96MB. The Sun JVMs default is 64MB. (Java HotSpot VM Options)]]></description>
			<content:encoded><![CDATA[<p>If Tomcat needs more memory then you have to add the following line to the catalina config file.</p>
<p><strong>Windows (catalina.bat)</strong></p>
<pre class="brush: xml; title: ; notranslate">
set JAVA_OPTS=%JAVA_OPTS% -server -Xms512M -Xmx768M -XX:MaxPermSize=128m
</pre>
<p>Grails 1.2 default PermGen memory is set to 96MB. The Sun JVMs default is 64MB. (<a href="http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp">Java HotSpot VM Options</a>)</p>
<p style="text-align: center;"><img class="size-medium wp-image-78 aligncenter" title="Memory" src="http://www.svenlange.co.za/wp-content/uploads/2010/01/memory-300x135.jpg" alt="Memory" width="300" height="135" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2010/01/give-the-tomcat-a-bit-more-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually install JDK 6 on Suse Linux Enterpise Edition 10 SP2</title>
		<link>http://www.svenlange.co.za/2009/06/manually-install-jdk-6-on-suse-linux-enterpise-edition-10-sp2/</link>
		<comments>http://www.svenlange.co.za/2009/06/manually-install-jdk-6-on-suse-linux-enterpise-edition-10-sp2/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 12:53:26 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JDK]]></category>
		<category><![CDATA[SLES]]></category>
		<category><![CDATA[Suse]]></category>

		<guid isPermaLink="false">http://www.svenlange.co.za/?p=53</guid>
		<description><![CDATA[First remove older and maybe protected JDKs with yast. yast -&#62; Software -&#62; Software management Then invoke following command on console. Afterwards create file /etc/profile.local and add following line. That&#8217;s it.]]></description>
			<content:encoded><![CDATA[<p>First remove older and maybe protected JDKs with yast.</p>
<p>yast -&gt; Software -&gt; Software management</p>
<p>Then invoke following command on console.</p>
<pre class="brush: plain; title: ; notranslate">
./jdk-6u14-linux-i586-rpm.bin
</pre>
<p>Afterwards create file <em>/etc/profile.local</em> and add following line.</p>
<pre class="brush: plain; title: ; notranslate">
export JAVA_HOME=/usr/java/jdk1.6.0_14
</pre>
<p>That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2009/06/manually-install-jdk-6-on-suse-linux-enterpise-edition-10-sp2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using storeXPath() in your Grails Webtest</title>
		<link>http://www.svenlange.co.za/2008/07/using-storexpath-in-your-grails-webtest/</link>
		<comments>http://www.svenlange.co.za/2008/07/using-storexpath-in-your-grails-webtest/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 09:47:27 +0000</pubDate>
		<dc:creator>Sven Lange</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[storeXPath]]></category>
		<category><![CDATA[Webtest]]></category>

		<guid isPermaLink="false">http://svenlange.co.za/?p=3</guid>
		<description><![CDATA[Today I had to figure out how to save some content from a site during a running Webtest so that I am able to restore all changed data afterwards. Luckily Webtest provides the step storeXPath() which does the job. But &#8230; <a href="http://www.svenlange.co.za/2008/07/using-storexpath-in-your-grails-webtest/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I had to figure out how to save some content from a site during a running Webtest so that I am able to restore all changed data afterwards. Luckily Webtest provides the step storeXPath() which does the job.</p>
<p>But it was not that easy to realize my task due to the lack of good documentation and finding the correct xpath expression.</p>
<p>The following code snippet grabs the text value from a text input field with the id surname and saves it in the ant property xyz.</p>
<pre class="brush: java; title: ; notranslate">
def testSomething() {
   webtest('Some description') {

      // saving initial value
      storeXPath(xpath: &quot;id('surname')/@value&quot;, property: &quot;xyz&quot;)

      // restore initial value
      setInputField(name: &quot;surname&quot;, value: &quot;#{xyz}&quot;)

   }
}
</pre>
<p>Pretty simple in the end, but it took a while till I got it. Maybe it helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.svenlange.co.za/2008/07/using-storexpath-in-your-grails-webtest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

