<?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>Don't mind the language</title>
	<atom:link href="http://dontmindthelanguage.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dontmindthelanguage.wordpress.com</link>
	<description>Erik Pragt's blog about all things language related.</description>
	<lastBuildDate>Fri, 19 Aug 2011 19:57:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dontmindthelanguage.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Don't mind the language</title>
		<link>http://dontmindthelanguage.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dontmindthelanguage.wordpress.com/osd.xml" title="Don&#039;t mind the language" />
	<atom:link rel='hub' href='http://dontmindthelanguage.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Why I&#8217;m not using Groovy at work</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/12/14/why-im-not-using-groovy-at-work/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/12/14/why-im-not-using-groovy-at-work/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 17:51:39 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lessons learned]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=122</guid>
		<description><![CDATA[A disclaimer: this blog is based on my personal failures with getting Grails accepted in our company. So, no, this is not the holy grail into dropping your EJB, Struts or Java toolkit to get groovy with Grails, but maybe you can learn something on how NOT to do it, and post some comments on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=122&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><i>A disclaimer: this blog is based on my personal failures with getting Grails accepted in our company. So, no, this is not the holy grail into dropping your EJB, Struts or Java toolkit to get groovy with Grails, but maybe you can learn something on how NOT to do it, and post some comments on your experience.</i></p>
<p><b>Introduction</b><br />
2.5 Years ago, I got my first cup of Grails. It was some time before the Groovy/Grails Exchange 2007, which I visited consecutively. As a result of that visit, I had Graeme Rocher over to our company to give a presentation about Grails (almost 0.4 at that time), and I expected the rest to follow naturally (the rest being: drop all our Java development and take up Grails for all of our web development). I was a little naive in that, I experienced the couple of months after that. Not even did we not drop all our Java development: we dropped none, nor did we picked up any of the cool features Groovy or Grails offered. Instead, people went crazy with frameworks like Wicket, SEAM and other cool stuff, like..ehh&#8230;EJB&#8217;s&#8230;</p>
<p>However, in my spare time I never left Grails and I used it for a lot of prototype applications, especially because the ease of setting up a complete project with Spring/Hibernate integration, etc. And also because it&#8217;s just fun to use the power the Grails framework harnesses. Anyway, I never could convince people to seriously use it. I inspired some people to use it, but only for short periods. The lack of IDE support didn&#8217;t help in that, and with the thousands of frameworks around, you&#8217;ve got to make a choice somewhere. However, I haven&#8217;t given up on Grails, and I still try to use it as much as possible. So, when I <a href="http://www.jworks.nl">started for myself</a> in April as an independent (though I do favor certain technologies!)  consultant, I thought: this is my chance! I can now focus on Grails technologies. However, even though I&#8217;m not quite inexperienced with Grails, I found it hard to find a good (well, any actually) project which was open to Grails, so I found a different project, in which I could focus on other things (like ATDD/TDD, XP, and other quality related things). </p>
<p>However, then, all of a sudden my manager showed some interest in Grails (might not be the best reason to use Grails btw, but it&#8217;s great that this is without any resistance!), and we decided to take on a project in Grails. There, the problems started. (Note: I don&#8217;t blame anyone in this, except myself: I should have used a different approach. That&#8217;s part of reason for writing this blog, to prevent you from making the same mistakes).</p>
<p>What I did first, was tell a little bit about Grails to explain the team how Grails works. That was actually my first mistake. I should have told them lots, lots, a little more, and everything again after that. I thought the transition would be easy, but they were struggling with the framework and the language. I didn&#8217;t expect this, to be honest. My expectation (and experience) is that Grails is easy to start with. Get <a href="http://www.apress.com/book/view/9781590597583">a book</a>, read <a href="http://www.grails.org/doc/latest/">the documentation</a>, and your ready to go. We built a good prototype, got great feedback on it! However, the old habit kicked in.</p>
<p><b>Building Grails</b><br />
First, we tried to build our Grails application with Maven. Bad idea, since it caused some nasty challenges, like getting the code coverage to appear, and getting come quality metrics with tools like <a href="http://codenarc.sourceforge.net/">CodeNarc</a>. However, you&#8217;ll still have to do your (transitive?) dependency management, releasing of software, reports, etc, so there&#8217;s something to say for using Maven. It didn&#8217;t quite work for us, however, and we spent quite some time into bending it into something which worked for us, which failed. I still haven&#8217;t found a viable alternative to Maven. Gradle is nice, Ivy + Ant/Gant seem okay, but that&#8217;s not nowhere near the power (I wouldn&#8217;t say flexibility) I got with using Maven. I do not, however, make this a Maven vs Whatever Build Tool discussion. I just happen to like Maven for it&#8217;s reports, plugin integration, dependency support and modular structure.</p>
<p><b>Team</b><br />
Then I also had to overcome the resistance of some of our team members to dynamic languages. Some people prefer the (fake, IMO) safety a statically typed language provides with it&#8217;s compilation process. Well, there&#8217;s no helping you if you do an Integer.parseInt(&#8220;abc&#8221;) in your Java code: it will fail just as badly. At runtime. That&#8217;s why we write tests, to cover cases like this. This is true for Java, and it&#8217;s just as true for Groovy. However, there was still a lot of FUD about Groovy&#8217;s usage in bigger projects regarding refactoring, tool support, and even performance. Well, to be honest: I have no idea how easy it is to refactor Groovy code, but, with less code to write, there&#8217;s less to refactor. While this might be a bit short sighted, I feel it holds true for a lot of cases.</p>
<p><b>IDE</b><br />
The tool support deserves a paragraph on it&#8217;s own. Eclipse + Groovy was not a good combination. At all. It was bad, worse, and even a bit worse than that. Even if you are the genius to get it to work (or would I say madmen, since a genius would choose a tool like NetBean or IntelliJ, or, heck, TextMate), you still wouldn&#8217;t be able to run a decent unit test in it. Did I mention refactoring? I didn&#8217;t, for a good reason: No Support For Refactoring. Let me rephrase that: No Support For Refactoring… in Eclipse. Then why choose Eclipse, and not a great tool like IntelliJ (I&#8217;m referring to the 8 release) or NetBeans you might ask. To be honest: I have no idea. I don&#8217;t use Eclipse. I&#8217;ve used IntelliJ for the last 5 years, and only recently I&#8217;m switching to <a href="http://dontmindthelanguage.wordpress.com/2009/12/06/switching-from-intellij-to-springsource-tool-suite/">SpringSource Tool Suite</a> because of <a href="http://www.jetbrains.net/devnet/thread/284904?tstart=0">JetBrains&#8217; ridiculous decision to not show module dependencies in the project view</a>. I hope they get some rest after the release of IntelliJ 9, and see the light to put it back in. Until that period, STS is a really good substitute, and has excellent <a href="http://jira.codehaus.org/browse/GRECLIPSE">Groovy</a> and <a href="https://issuetracker.springsource.com/browse/STS">Grails</a> support, which is getting better each day! </p>
<p><b>The right approach?</b><br />
So, if I would introduce Groovy or Grails again at my work, I would:<br />
- Pick the right people. People who are not intimidated by a dynamic language, but who have the discipline to use it right.<br />
- Pick the right people. People who are prepared to make a switch. To switch from IDE, switch from build tool, switch from language.<br />
- Pick the right people. People who have the mentality to make it work, overcome challenges and share their findings. </p>
<p><b>Conclusion</b><br />
It wasn&#8217;t intentional to put &#8216;Pick the right people&#8217; there, but I think that this is the critical factor to make it work. Make it work from within the team, and make it work from outside of the team (IT operations, Management, etc). I&#8217;m looking forward into hearing your responses to this. I hope it doesn&#8217;t sound to bitter, cause I&#8217;m not. I just made the wrong choices with a partially not-suitable team. It&#8217;s my mistake, and I don&#8217;t blame anyone but me. I just hope people can learn from my experiences, and the post from <a href="http://www.anyware.co.uk/2005/2009/12/14/why-arent-you-using-grails-at-work/">Marc Palmer</a> was just the right incentive to finish this post. I hope it helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=122&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/12/14/why-im-not-using-groovy-at-work/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy 1.7 Power Assert</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/12/11/groovy-1-7-power-assert/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/12/11/groovy-1-7-power-assert/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 23:50:27 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[groovy assert]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=115</guid>
		<description><![CDATA[I already mentioned this in my previous post, but I wanted to go a little bit deeper on this: the new Groovy Power Assert (and no, let&#8217;s not call is GPA). Groovy Power Assert makes assertions quite more powerful. The best way to demonstrate is ofcourse by example. When running the following code in Groovy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=115&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I already mentioned this in my previous post, but I wanted to go a little bit deeper on this: the new Groovy Power Assert (and no, let&#8217;s not call is GPA).</p>
<p>Groovy Power Assert makes assertions quite more powerful. The best way to demonstrate is ofcourse by example. When running the following code in Groovy 1.6:</p>
<pre class="brush: java;">
a = 10
b = 9

assert 91 == a * b
</pre>
<p>This will be your output:</p>
<pre class="brush: plain;">
Exception thrown: Expression: (92 == (a * b)). Values: a = 10, b = 9

java.lang.AssertionError: Expression: (92 == (a * b)). Values: a = 10, b = 9
	at ConsoleScript2.run(ConsoleScript2:4)
</pre>
<p>While quite helpful, Groovy 1.7 introduced an even better assert, which was initially developed for the <a href="http://spockframework.org/">Spock framework</a>. The new output of running the above in a Groovy 1.7 console is this:</p>
<pre class="brush: plain;">
Exception thrown

Assertion failed: 

assert 91 == a * b
          |  | | |
          |  10| 9
          |    90
          false

	at ConsoleScript2.run(ConsoleScript2:4)
</pre>
<p>Which gives you much more insight in why the assert fails. You don&#8217;t have to use numbers, you can use any type of object to assert on, and the assert statement will call the toString method of that class, as demonstrated below:</p>
<pre class="brush: java;">
def names = [ 'erik', 'marcel', 'sebastien' ]
def reverse = names.reverse()

assert ['sebastien', 'erik', 'marcel'] == reverse
</pre>
<p>Which will output the following:</p>
<pre class="brush: plain;">
assert ['sebastien', 'erik', 'marcel'] == reverse
                                       |  |
                                       |  [sebastien, marcel, erik]
                                       false
</pre>
<p>Quite funky he? Groovy now gives you some nicely formatted assert information which will help you to tackle your failed tests even faster!</p>
<p>PS: (okay, okay, I added this later&#8230;.) The same works for special Groovy objects, like GPathResults. For example, check the following code:</p>
<pre class="brush: java;">
def xml = new XmlParser().parseText(&quot;&lt;test&gt;x&lt;/test&gt;&quot;)
assert &quot;y&quot; == xml.text()
</pre>
<p>The result of this:</p>
<pre class="brush: plain;">
assert &quot;y&quot; == xml.text()
           |  |   |
           |  |   x
           |  test[attributes={}; value=[x]]
           false
</pre>
<p>(Mykola, is this what you meant?)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=115&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/12/11/groovy-1-7-power-assert/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Gr8 conference in Denmark, 2010</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/12/10/gr8-conference-in-denmark-2010/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/12/10/gr8-conference-in-denmark-2010/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:07:46 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=110</guid>
		<description><![CDATA[At the 19th and 20th of May 2010,the GR8 conference will be held. From the website: &#8220;The GR8 Conference is an affordable conference dedicated to the Groovy dynamic language, the Grails web framework, the Griffon Swing framework, and other great technologies — hence the pun and code name GR8.&#8221;. The agenda is not officially known [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=110&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the 19th and 20th of May 2010,the <a href="http://www.gr8conf.org/">GR8 conference</a> will be held. From the website: &#8220;The GR8 Conference is an affordable conference dedicated to the Groovy dynamic language, the Grails web framework, the Griffon Swing framework, and other great technologies — hence the pun and code name GR8.&#8221;. The agenda is not officially known yet, but from good sources I have heard that (ofcourse) Guillaume Laforge will come, as well as know speakers like Andreas Almiray, Mr Haki (from the well known <a href="http://mrhaki.blogspot.com">Groovy Goodness</a> series, Sebastian Blank with his iWebkit plugin, Phillippe Delebarre, and many more. With a lineup like this, it&#8217;s a conference not to be missed, so checkout the <a href="http://www.gr8conf.org/">site</a>, which will be open for registration soon, and enjoy some Groovy and Grails quality time in Denmark!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=110&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/12/10/gr8-conference-in-denmark-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy @Delegate annotation</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/12/09/groovy-delegate-annotation/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/12/09/groovy-delegate-annotation/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:45:20 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=108</guid>
		<description><![CDATA[Groovy 1.7 provides some nice new annotations. One of those annotations is the @Delegate. What it essentially does, is providing the methods of the Delegate to the class using the Delegate. This is best explained by a small example: This works really nice. The Manager now delegates the call for doWork() to the Employee. This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=108&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Groovy 1.7 provides some nice new annotations. One of those annotations is the @Delegate. What it essentially does, is providing the methods of the Delegate to the class using the Delegate. This is best explained by a small example:</p>
<pre class="brush: java;">
class Employee {
   def doWork() {  &quot;work!&quot; }
}

class Manager {
   @Delegate Employee employee = new Employee()
}

manager = new Manager()
assert &quot;work!&quot; == manager.doWork()
</pre>
<p>This works really nice. The Manager now delegates the call for doWork() to the Employee. This is quite powerful, and works really nice and easy.</p>
<p>However, what happens when the Manager has two delegates?</p>
<pre class="brush: java;">
class Cleaner {
   def clean() { &quot;clean&quot; }
   def doWork() { &quot;doWork&quot; }
}

class Employee {
   def doWork() {  &quot;work!&quot; }
}

class Manager {
   @Delegate Cleaner cleaner = new Cleaner()
   @Delegate Employee employee = new Employee()
}

manager = new Manager()

assert &quot;work!&quot; == manager.doWork()
assert &quot;clean&quot; == manager.clean()
</pre>
<p>This also works really nice. Now the Manager has two delegates, and it can delegate the clean method to the Cleaner, and the doWork method to the Employee. However, since I&#8217;m quite curious, and had a small twiscussion with <a href="http://www.twitter.com">@darthvader42</a> on this: what happens when the names of the Delegates clash, ie. the Cleaner and Employee both have a method with the same name. This is demonstrated below:</p>
<pre class="brush: java;">
class Cleaner {
   def doWork() { &quot;clean&quot; }
}

class Employee {
   def doWork() {  &quot;work!&quot; }
}

class Manager {
   @Delegate Employee employee = new Employee()
   @Delegate Cleaner cleaner = new Cleaner()
}

manager = new Manager()

assert &quot;work!&quot; == manager.doWork()
assert &quot;clean&quot; == manager.doWork()
</pre>
<p>This fails! Argh! What happens? The console output is fortunately very clear:</p>
<p><code><br />
assert "clean" == manager.doWork()<br />
               |  |       |<br />
               |  |       work!<br />
               |  Manager@2e6a54f9<br />
               false<br />
</code></p>
<p>What happened, is that Groovy picked the first Delegate it encountered, and uses those methods. The Cleaner doWork is not called anymore, since all calls to doWork are handled by the Employee. </p>
<p><b>Conclusion</b><br />
The @Delegate is a very handy annotation to handle some of the plumbing code for you, but just beware of the results when using more than two @Delegates. Btw, while writing this conclusion, I was also curious what would happen if the Manager itself has a doWork method. As I expected, the doWork method of the Manager takes precedence over that of it&#8217;s delegates, so the doWork method of the Manager itself is called!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=108&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/12/09/groovy-delegate-annotation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Switching from IntelliJ to SpringSource Tool Suite</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/12/06/switching-from-intellij-to-springsource-tool-suite/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/12/06/switching-from-intellij-to-springsource-tool-suite/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 10:33:21 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=104</guid>
		<description><![CDATA[A small disclaimer: I&#8217;m a big fan of IntelliJ. In every project I&#8217;m on, I use IntelliJ, and it has happened quite often that people get interested in the product, and decide to switch. However, because of some changes in IntelliJ 9 regarding the non-visibility of module dependencies (a feature any IDE has, including IntelliJ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=104&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A small disclaimer: I&#8217;m a big fan of IntelliJ. In every project I&#8217;m on, I use IntelliJ, and it has happened quite often that people get interested in the product, and decide to switch. </p>
<p>However, because of some changes in IntelliJ 9 regarding the non-visibility of module dependencies (a feature any IDE has, including IntelliJ 8), I decided to look for alternatives. Not knowing which dependencies a module has is an unworkable situation for me, since I find quite important to know if my UI module depends on a ORM mapper, or not (in most cases, it should not).</p>
<p>Luckily, there are (quite) some alternatives. I&#8217;ve decided to check out SpringSource Tool Suite, because:<br />
a) It integrates with technologies like Spring and Hibernate<br />
b) It has support for Maven, which I use for almost every project<br />
c) It has Groovy and Grails support<br />
d) It&#8217;s free. This is not a big deal for me, since I also paid for IntelliJ (and it was worth every euro), but this way, it&#8217;s easy to try out.</p>
<p>So I downloaded SpringSource Tool Suite here: http://www.springsource.com/products/sts, and after a quick download (and mount, I&#8217;m on MacOS), I was ready to go. I imported the Maven project (File -&gt; Import -&gt; Maven) and I was ready to go. </p>
<p>Wait&#8230;what&#8217;s this error I&#8217;m getting?? </p>
<p>&#8220;The type PostConstruct is not accessible due to restriction on required library /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar&#8221;</p>
<p>Hmm, it seems my project is using an @PostContruct annotation, and for some reason, this is causing problems. Well, after browsing an little through the options, I found this setting, which is the cause of the problem:</p>
<div id="attachment_105" class="wp-caption alignnone" style="width: 554px"><a href="http://dontmindthelanguage.files.wordpress.com/2009/12/screen-shot-2009-12-06-at-11-24-12.png"><img src="http://dontmindthelanguage.files.wordpress.com/2009/12/screen-shot-2009-12-06-at-11-24-12.png?w=544&#038;h=357" alt="" title="Screen shot 2009-12-06 at 11.24.12" width="544" height="357" class="size-full wp-image-105" /></a><p class="wp-caption-text">SpringSource Tool Suite - Errors / Warnings</p></div>
<p>This can be found by going to the preferences screen, and then go to Java -&gt; Compiler -&gt; Errors / Warnings, and there you&#8217;ll have to set the Forbidden reference access rule to &#8216;Ignore&#8217; (or warning, but I don&#8217;t like the yellow warnings, not for a reason like this anyway)</p>
<p>After setting the option to ignore and rebuilding the project, I good to go, and my project built without any problems! </p>
<p>In short: first impression: nice! I&#8217;ll post more about my experiences with SpringSource Tool Suite here in the near future!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=104&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/12/06/switching-from-intellij-to-springsource-tool-suite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>

		<media:content url="http://dontmindthelanguage.files.wordpress.com/2009/12/screen-shot-2009-12-06-at-11-24-12.png" medium="image">
			<media:title type="html">Screen shot 2009-12-06 at 11.24.12</media:title>
		</media:content>
	</item>
		<item>
		<title>Reloading pages in Wicket</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/08/07/reloading-pages-in-wicket/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/08/07/reloading-pages-in-wicket/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 09:55:03 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[reload]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[wicket]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=97</guid>
		<description><![CDATA[When developing software, and especially web frontends, is nice and handy to get some immediate feedback on the work you&#8217;ve done, without having to rebuild all dependent projects, killing servers, redeploying wars, etc. At my current project, we have a simple web frontend which is using Wicket, which needs some changes now and then. Unfortunately, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=97&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When developing software, and especially web frontends, is nice and handy to get some immediate feedback on the work you&#8217;ve done, without having to rebuild all dependent projects, killing servers, redeploying wars, etc. </p>
<p>At my current project, we have a simple web frontend which is using Wicket, which needs some changes now and then. Unfortunately, Wicket doesn&#8217;t reload pages out of the box, and you need some to make this work.</p>
<p>What is recommended to do (but not required), is to set Wicket in development mode. This can be done in multiple ways, but I&#8217;ve set the System property &#8216;wicket.configuration&#8217; to &#8216;development&#8217;. Then, by changing some code in the WicketApplication (which extends WebApplication), you can enable the hot reloading of resource files. The following code is required for that:</p>
<pre class="brush: java;">
String configurationType = getConfigurationType();
if (DEVELOPMENT.equalsIgnoreCase(configurationType)) {
  log.info(&quot;You are in DEVELOPMENT mode&quot;);
  getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
}
</pre>
<p>This way, by recompiling the classes, Wicket detects the changes to HTML and will reload them for you, without having to redeploy the whole application, or needing to restart Jetty. Nice!</p>
<h3>References</h3>
<p><a href="http://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment">Wicket FAQ</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=97&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/08/07/reloading-pages-in-wicket/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>The First NLGUG Meetup</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/05/16/the-first-nlgug-meetup/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/05/16/the-first-nlgug-meetup/#comments</comments>
		<pubDate>Sat, 16 May 2009 21:25:48 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[NLGUG]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[lunatech]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[rotterdam]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/2009/05/16/the-first-nlgug-meetup/</guid>
		<description><![CDATA[On the 7th of May, we had our first NLGUG Groovy an Grails meetup. In one word: it was great! Normally, when I organize something (be it a motorcycling event, going to the movies, or anything else), of all the people who said &#8216;yes&#8217;, 30% will show up (that is, if I&#8217;m lucky). Since 12 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=91&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On the 7th of May, we had our first NLGUG Groovy an Grails meetup. In one word: it was great!</p>
<p>Normally, when I organize something (be it a motorcycling event, going to the movies, or anything else), of all the people who said &#8216;yes&#8217;, 30% will show up (that is, if I&#8217;m lucky). Since 12 people expressed that they would attend the first meetup, I expected a group no bigger than 5 people to show up. You can imagine my surprise when out of 12 people, 18 showed up! That&#8217;s 150% more than you might have expected, and 500% more than I expected! </p>
<p>The event was kindly hosted by Lunatech Research BV, a small company in Rotterdam, who wanted to impress us with their office and hospitality. That succeeded greatly in that! The office was great, and the snacks where snacks++ ! Really well done, again: thanks for hosting the event! </p>
<p>The plan was to have 2 small sessions (of around 50 minutes each), drink some beer, get to know each other a little, etc. I think it worked out pretty well. We started with a introduction round, and it became apparent quite quickly that not a lot of people really (that is: in production) something with Groovy and Grails. Out of 18 people, only 2 people had real life experience with Grails. While I certainly hope this will increase, this is a really nice baseline. There were quite some members who had something in the pipeline, but nothing to concrete yet.<br />
After our round of introduction, I had a small talk about how Flex, Grails and JMS could be combined into a small chat application. I thought it was a nice application, but due to time constraints, my presentation could have been better&#8230; Well, hopefully I&#8217;ll have some more preparation time next time!<br />
The second presentation, which was presented by Michel Vollebregt, was great! The presentation described how to use Groovy DSLs, and was a great combination of combining Java + Groovy to create a very readable (at least: from a user perspective) language to calculate savings over the years. A really nice presentation with live coding, which deserves a lot of extra credits, IMO. </p>
<p>All in all, I think the whole evening was great. I&#8217;ve met a lot of new people who were all equally enthousiastic about G&amp;G, and I heard a lot of great feedback about the evening. I think it was a big succes, and I&#8217;m looking forward to our next meetup in a month or two, which will be hosted by VX company this time. Great work guys!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=91&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/05/16/the-first-nlgug-meetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveMQ NullPointer exceptions when creating objectmessages.</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/03/24/activemq-nullpointer-exceptions-when-creating-objectmessages/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/03/24/activemq-nullpointer-exceptions-when-creating-objectmessages/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 14:12:27 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=88</guid>
		<description><![CDATA[At the moment, I&#8217;m working with Flex, BlazeDS en ActiveMQ in a Spring application. I&#8217;m using Flex to display some of my database contents, and for direct communication, I use BlazeDS, and for updating the view, I use JMS (ActiveMQ) in combation with BlazeDS. It works by publishing information to topics, which can be easily [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=88&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the moment, I&#8217;m working with Flex, BlazeDS en ActiveMQ in a Spring application. I&#8217;m using Flex to display some of my database contents, and for direct communication, I use BlazeDS, and for updating the view, I use JMS (ActiveMQ) in combation with BlazeDS. It works by publishing information to topics, which can be easily done using the following code:</p>
<pre class="brush: java;">
    private void sendJmsUpdate() {
        this.jmsTemplate.send(this.destination, new MessageCreator() {
            public Message createMessage(Session session) throws JMSException {
                return session.createObjectMessage(new ArrayList&lt;TodoItem&gt;(getList()));
            }
        });
    }
</pre>
<p>The above code uses the <a href="http://static.springframework.org/spring/docs/2.5.5/api/org/springframework/jms/core/JmsTemplate.html">Spring JmsTemplate</a> to created messages and send them to the topic. However, when I tried this, I got this exception:</p>
<p><code><br />
java.lang.NullPointerException<br />
	at org.apache.activemq.ActiveMQMessageTransformation.copyProperties(ActiveMQMessageTransformation.java:188)<br />
	at org.apache.activemq.ActiveMQMessageTransformation.transformMessage(ActiveMQMessageTransformation.java:173)<br />
	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1606)<br />
	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:227)<br />
	at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)<br />
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:572)<br />
	at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:549)<br />
	at org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:516)<br />
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:447)<br />
	at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:514)<br />
	at org.epseelon.samples.todolist.business.TodoServiceImpl.sendJmsUpdate(TodoServiceImpl.java:77)<br />
	at org.epseelon.samples.todolist.business.TodoServiceImpl.save(TodoServiceImpl.java:39)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:585)<br />
</code></p>
<p>After a lot of Googling, I found nothing (well, a bug report somewhere, which was totally unrelated to what I had here). Why did I get this error?? I know my remoting was working (String were send), my objects were fine since I could get the list manually by doing a Refresh with the flex client itself (which used &lg;mx:RemoteObject&gt;) to call the Spring service&#8230;. And then it occured to me that the explanation was already here. I just overlooked it (hate it when that happens): the BlazeDS service apparently doesn&#8217;t require the objects (TodoItem) to be Serializable&#8230;. JMS ofcourse does! Argh! I forgot to implement Serializable here!</p>
<p>So, if you ever encounter this message, which is hardly descriptive at all, check your objects to see if they are all serializable. It saves a lot of debugging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=88&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/03/24/activemq-nullpointer-exceptions-when-creating-objectmessages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Dutch Groovy and Grails User Group</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/03/16/dutch-groovy-and-grails-user-group/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/03/16/dutch-groovy-and-grails-user-group/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 15:57:00 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[NLGUG]]></category>
		<category><![CDATA[dutch]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[nlgug]]></category>
		<category><![CDATA[user group]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/2009/03/16/dutch-groovy-and-grails-user-group/</guid>
		<description><![CDATA[At the moment, I&#8217;m busy reviving the Dutch Groovy and Grails User Group. The goal is to meet other local Groovy and Grails developers to talk about code, architecture, and lots of innovation. Both beginners and pros are ofcourse welcome! I&#8217;ve already planned the first event, at (probably) May the 1st, which is viewable here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=86&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the moment, I&#8217;m busy reviving the <a href="http://www.nlgug.org">Dutch Groovy and Grails User Group</a>. The goal is to meet other local Groovy and Grails developers to talk about code, architecture, and lots of innovation. Both beginners and pros are ofcourse welcome! </p>
<p>I&#8217;ve already planned the first event, at (probably) May the 1st, which is viewable <a href="http://www.meetup.com/nl-gug/calendar/9964393/">here</a></p>
<p>This evening will be an opportunity for software developers to meet people with different experience levels with the language and the framework. It will also be a good way to identify how to help your and other companies by using Grails. The program isn&#8217;t carved in stone yet, but if you have some suggestion, let me know!</p>
<p>Furthermore, I&#8217;ve setup an Linkedin group, to get an indication of the interest in Groovy and Grails in the Netherlands. You can join that group <a href="http://www.linkedin.com/groups?gid=1843736">here</a>. </p>
<p>So I hope you can help me make this a great succes, and let the Dutch GG community have a voice in the Netherlands!</p>
<p>I&#8217;m really dedicated to make this work, but I need your help! It would therefor be great if you could all join, so we can organize some interesting session.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=86&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/03/16/dutch-groovy-and-grails-user-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>
	</item>
		<item>
		<title>Groovy PowerPoint DSL</title>
		<link>http://dontmindthelanguage.wordpress.com/2009/02/27/groovy-powerpoint-dsl/</link>
		<comments>http://dontmindthelanguage.wordpress.com/2009/02/27/groovy-powerpoint-dsl/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 23:22:40 +0000</pubDate>
		<dc:creator>Erik Pragt</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[powerpoint]]></category>

		<guid isPermaLink="false">http://dontmindthelanguage.wordpress.com/?p=75</guid>
		<description><![CDATA[Blog describing the creation of a Groovy PowerPoint DSL, to give a practical demonstration of the Builder support in Groovy.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=75&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really not <a href="http://blog.xebia.com/2008/04/10/dont-shave-that-yak/">shaving a yak</a> here, but I created a PowerPoint DSL to give a presentation about DSLs! Let&#8217;s jump to the code immediately, because if you&#8217;re reading this, you must be interested in DSLs.</p>
<p>This is the (Groovy) DSL I wrote:</p>
<pre class="brush: java;">
builder.slideshow(filename:'Test.ppt') {
    slide(title: 'Introduction') {
        bullet(text: 'Bullet 1')
        bullet(text: 'Bullet 2')
    }
    slide(title: 'Slide 2') {
        bullet(text: 'Bullet 3')
        bullet(text: 'Bullet 4')
    }
    slide(title: 'Example') {
        textbox(&quot;&quot;&quot;This is a slide
With a lot of extra lines
Which make no sense
At all&quot;&quot;&quot;)
    }
    imageslide(src:'background.png')
}
</pre>
<p>The DSL is pretty straightforward. I didn&#8217;t support all features of PowerPoint (nor would I want to, nor is it feasible), but the basics are here. The DSL currently supports all of the above:</p>
<ul>
<li>Slides with titles
<li>Bullets, which can be added to the slides
<li>Textboxes, which are large text area&#8217;s
<li>Imageslides, which are slides consisting of only images. This is to support all the &#8216;Beyond Bullet Points&#8217; lovers <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</ul>
<p>While the DSL is far from complete (you could add individual images, position them using X,Y coordinates, add tables, add notes and more), the idea is clear: in a consistent and easy to read structure you can define all those elements you need in a powerpoint presentation. All the missing elements, like stated above, can easily be added by adding it to corresponding domain and exporter.</p>
<p>Domain and exporter you say? Yes! There are ofcourse multiple approaches in creating the DSL, but I&#8217;ve kept some parts apart from each other. Under the hood, the DSL is transformed into a very simple domain model, also consisting of slides, bullets, textboxes, etc. This extra layer is introduced to create a separation of concerns. Now, the only responsibility of the Builder is to build the domain model, instead of parsing the DSL and also creating the Powerpoint. The creation of the powerpoint is now delegated to a (also) simple Exporter, which understands the API of the POI library used to create the actual PowerPoint file. So, the model is built by the Groovy Builder, and, once the build phase is complete, the model is given to the exporter, which traverses the model. This makes the code cleaner and also allows easy testing of both the DSL and the Exporter. Ofcourse, I tested none, but instead relied on my excellent programming skills&#8230;&#8230;(The next blog is about TDD, okay??)</p>
<p>This resulted in the following diagram:<br />
<div id="attachment_74" class="wp-caption alignnone" style="width: 554px"><img src="http://dontmindthelanguage.files.wordpress.com/2009/02/overview.png?w=544&#038;h=156" alt="Application diagram" title="Diagram" width="544" height="156" class="size-full wp-image-74" /><p class="wp-caption-text">Application diagram</p></div></p>
<p>I like the approach, but if you don&#8217;t, or know a better way, please let me know. I&#8217;d really appreciate feedback, since I will probably use a similar approach in the next DSL I create.</p>
<p>The code, and the resulting PowerPoint,  can be found in the <a href="http://www.2shared.com/file/4970638/6bf331af/pptdsl.html">uploaded zipfile</a>. Like I said: as always, let me know what you think!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dontmindthelanguage.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dontmindthelanguage.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dontmindthelanguage.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dontmindthelanguage.wordpress.com&amp;blog=5827684&amp;post=75&amp;subd=dontmindthelanguage&amp;ref=&amp;feed=1" width="1" height="1" /><div class="sharedaddy"></div>]]></content:encoded>
			<wfw:commentRss>http://dontmindthelanguage.wordpress.com/2009/02/27/groovy-powerpoint-dsl/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Erik Pragt</media:title>
		</media:content>

		<media:content url="http://dontmindthelanguage.files.wordpress.com/2009/02/overview.png" medium="image">
			<media:title type="html">Diagram</media:title>
		</media:content>
	</item>
	</channel>
</rss>
