Author Archive for p3t0r Archive Page 5
LazyList based on the Google Collections Library
4 Comments Published by peter October 1st, 2007 in java.In my previous post I mentioned implementing the Google Collections counterpart of the commons-collections LazyList. I'll refer to the Google Collections Library as GCL from now on.
The LazyList decorates another List to create objects in the list on demand. To code below is loosly based on the code in commond-collections' lazylist counterpart. Most modifications are [...]
Recently the Google Collections Library came to my attention. The Google Collections Library is a suite of new collections and collection-related goodness for Java 5.0, brought to you by Google.
Since I'm a frequent user of apaches' commons-collections library I wondered what the difference is.
From browsing the API and FAQ it seems that:
It fully based [...]
Grails and tests - Part I: Getting started with TDD
2 Comments Published by peter September 26th, 2007 in grails, groovy, testing.Writing tests for a Grails applications is really simple. In Groovy code actually compiles when non-existing methods of objects are referenced (as opposed to Java) which makes it possible exercise TDD (test driven development).
Grails supports two types of tests out of the box, unittests and integrationtests. Tests are located in the test folder of [...]
Yesterday I presented at the Battle of the Geeks 2007 organized by my employer. 4 presentations where given and people in the audience where asked to rate each presentation using special cards. (I translated this post to Dutch for the Finalist developer blog)
19.15 Presentation 1: CMS Container
Freek Punt talked about Finalists' own MMBase based [...]
While setting up JAXB2 for converting object graphs to XML I came across a not-so-nice part of the annotations specification. While looking for a way to define a package level annotation (never needed to do this before) I found the solution a bit surprising:
To define a package-level annotation one has to create a file called [...]
Groovy 1.1. beta 3 was announced a couple of days ago and includes some interesting additions to the groovy language, like a real method missing. Grails' lead developer Graeme Rocher has a simple example of the way it works in his blog:
PLAIN TEXT
GROOVY:
Foo.metaClass.methodMissing = { String name, args ->
Foo.metaClass."$name" = { Object[] varArgs [...]
Quick take at Wicket Web Beans
2 Comments Published by peter September 13th, 2007 in java, wicket, wwb.Recently a really interesting wicket extension emerged: Wicket Web Beans (WWB).
Wicket Web Beans (WWB) is an Apache Wicket component toolkit for displaying and editing POJOs that conform to the JavaBeans specification. Web pages are automatically generated based on bean properties and certain conventions. If necessary, the layout, editability, and actions of these pages can be [...]
Presentation: Introduction to Spring MVC
0 Comments Published by peter September 10th, 2007 in java, spring, spring mvc, workshop.I was asked to do a series of presentations and workshops regarding Spring MVC at the HvA. Last Friday I started off with a presentation and some live coding examples.
Although the students didn't have much experience with Spring or Java web development I think I did manage to give them some ideas about what Spring [...]
Today Graeme and the Grails team have released a significant new version of Grails: 0.6.
One of the more interesting bits added in this release is the addition rich conversation support (Spring Web Flow under the hood) called Grails Flow. Apart from Grails flow the release notes contain the following updates:
Joint Groovy/Java Compilation
Support for Spring scopes [...]
Unittesting e-mail sending using Spring
2 Comments Published by peter August 29th, 2007 in e-mail, java, junit, smtp, spring, wiser.In previous projects I mostly skipped writing tests for sending mail. Mostly due to the fact that there is a dependency on a working SMTP server. This time I decided to invest some time in finding a solution for this problem.
It didn't have to look very far to find Wiser. Wiser is a very simple [...]


















