Posts Tagged ‘ NewRelease ’

SiteMesh 2.1 released

SiteMesh 2.1 has been released. The main changes in this release:

* Out-of-the-box support for writing decorators in Velocity.
* Performance improvements.
* Numerous bug-fixes, particularly container-specific issues.

Read an introduction and then download.

Announcing XStream: Java to XML serialization, and back again.

XStream is a simple library to serialize objects to XML and back again.


  • Ease of use. A high level facade is supplied that simplifies common use cases.
  • No mappings required. Custom objects can be serialized without need for specifying mappings.
  • Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput.
  • Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization.
  • Requires no modifications to objects. Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor.
  • Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports circular references.
  • Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML).
  • Customizable conversion stategies. Strategies can be registered allowing customization of how particular types are represented as XML.
  • Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.

Easily build complicated SELECT statements with Squiggle

After serving me loyally for four years, I’ve finally got around to open-sourcing Squiggle – a small Java library for dynamically building complicated SQL SELECT statements.

Sometimes (not often these days) you just need to get your hands dirty and write a beastly SELECT statement. Maybe a persistence layer is deemed overkill for your application, or maybe a persistence layer is struggling with the type of query you want to do. There are times when writing some SQL is the right thing to do.

Here’s the blurb from the website:

Squiggle does one thing and only one thing. It generates SELECT statements based on criteria you give it. It’s sweet spot is for applications that need to build up complicated queries with criteria that changes at runtime. Ordinarily it can be quite painful to figure out how to build this string. Squiggle takes much of this pain away.

The code for Squiggle is intentionally clean and simple. Rather than provide support for every thing you could ever do with SQL, it provides support for the most common situations and allows you to easily modify the source to suit your needs.


* Concise and intuitive API.
* Simple code, so easy to customize.
* No dependencies on classes outside of JDK1.2.
* Small, lightweight, fast.
* Generates clean SQL designed that is very human readable.
* Supports joins and sub-selects.

Here’s a very simple example:

Table people = new Table("people");

SelectQuery select = new SelectQuery(people);

select.addColumn(people, "firstname");
select.addColumn(people, "lastname");

select.addOrder(people, "age", Order.DECENDING);


Which produces:

people.firstname ,
people.age DESC

Go check out the website and two minute tutorial.

XStream 0.2 released

See this.

XStream is nearing a release

XStream is a simple object -> xml -> object serialization tool. There are many other tools that do similar things out there. Here are some of the features that distinguish it from the others:

* Very fast.
* Requires no custom mappings to be created.
* Can serialize objects that have private fields and non-default constructors.
* Handles arbitary objects and collections.
* Produces very clean XML; the kind a human would write.
* Does not duplicate any information in the XML that can be obtained via reflection.
* Decoupled from XML implementations. Use it with DOM, JDOM, DOM4J, or even non-XML streams (such as custom configuration objects, YAML or properties files).
* Open source, BSD license.

Here’s an example chunk of XML produced by XStream:




New Book: Java Open Source Programming

Our new book, (With the snappy title, Java Open Source Programming : with XDoclet, JUnit, WebWork and Hibernate) hits the shelves this months. A joint effort between Pat Lightbody, Ara Abrahamian, Mike Cannon-Brookes and myself.

This book :

* Highlights many of the complexities of J2EE and shows how to leverage best of breed open-source tool to reduce or even eliminate these.
* Introduces you to some of the coolest open-source projects in the history of mankind.
* Demonstrates the test-driven-development to drive design (and even some tests).
* And most importantly of all… shows how to combine these tools and techniques to deliver an end-application.

Go pre-order!

SiteMesh.NET in CVS

Jeremy Clymer has ported SiteMesh to .NET. And it works like a charm!

Here’s the feedback that I’ve had so far.

bq. “SiteMesh.NET rocks dude!”

bq. “I downloaded and it just worked.”

You can get it from “CVS”: if you can’t wait for a release. It’s already stable.

MockObjects Java 0.09

The latest release of the Mock Objects Java project is available. The dynamic mock generation API has been improved greatly and it now allows a lot more flexibility in setting up expectations and return values resulting in less brittle tests.


NMock 1.0

After many months of little changes, we deemed NMock production quality. It stabilised quickly many months ago and has changed very little since.

Documentation is somewhat sparse – contributions welcome!”: